/
snyk_basic_spec.sh
54 lines (48 loc) · 1.53 KB
/
snyk_basic_spec.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#shellcheck shell=sh
Describe "Snyk CLI basics"
Describe "snyk version"
It "prints version"
When run snyk version
The output should include "${EXPECTED_SNYK_VERSION}"
The status should be success
# TODO: unusable with our current docker issues
The stderr should equal ""
End
It "prints version with --version flag"
When run snyk --version
The output should include "${EXPECTED_SNYK_VERSION}"
The status should be success
# TODO: unusable with our current docker issues
The stderr should equal ""
End
End
Describe "snyk help"
It "prints help info"
When run snyk help
The output should include "$ snyk [command] [options] [package]"
The status should be success
# TODO: unusable with our current docker issues
The stderr should equal ""
End
End
Describe "snyk config"
It "prints config"
When run snyk config
The stdout should equal ""
The status should be success
End
It "sets config"
When run snyk config set newkey=newvalue
The output should include "newkey updated"
The status should be success
The result of "print_snyk_config()" should include "newkey: newvalue"
End
It "unsets config"
When run snyk config unset newkey
The output should include "newkey deleted"
The status should be success
The result of "print_snyk_config()" should not include "newkey"
The result of "print_snyk_config()" should not include "newvalue"
End
End
End