-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add skipper for secure (#913)
- Loading branch information
Showing
8 changed files
with
74 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
package version | ||
|
||
import "testing" | ||
|
||
func TestIsVersionGreaterOrEqualThan(t *testing.T) { | ||
tests := []struct { | ||
version string | ||
target string | ||
want bool | ||
}{ | ||
{ | ||
version: "0.9.1", | ||
target: "0.9.1", | ||
want: true, | ||
}, | ||
{ | ||
version: "0.10.0", | ||
target: "0.9.1", | ||
want: true, | ||
}, | ||
{ | ||
version: "0.9.0", | ||
target: "0.9.1", | ||
want: false, | ||
}, | ||
} | ||
for _, test := range tests { | ||
result := IsVersionGreaterOrEqualThan(test.version, test.target) | ||
if result != test.want { | ||
t.Errorf("got result %v, want %v.", result, test.want) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
-- activity | ||
CREATE TABLE activity ( | ||
id INTEGER PRIMARY KEY AUTOINCREMENT, | ||
creator_id INTEGER NOT NULL, | ||
created_ts BIGINT NOT NULL DEFAULT (strftime('%s', 'now')), | ||
type TEXT NOT NULL DEFAULT '', | ||
level TEXT NOT NULL CHECK (level IN ('INFO', 'WARN', 'ERROR')) DEFAULT 'INFO', | ||
payload TEXT NOT NULL DEFAULT '{}' | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters