af-addon-tester 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +15 -2
- data/bin/af-addon-tester +3 -2
- data/config/manifest.example.json +1 -0
- data/lib/af-addon-tester/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -7,10 +7,17 @@ Allows developers to test App Fog add-ons
|
|
7
7
|
|
8
8
|
## Setup ##
|
9
9
|
|
10
|
-
1) Clone
|
10
|
+
1) Clone or Gem Install
|
11
|
+
|
12
|
+
Clone:
|
11
13
|
|
12
14
|
$ git clone git@github.com:tsantef/af-addon-tester.git
|
13
15
|
|
16
|
+
Gem:
|
17
|
+
|
18
|
+
$ gem install af-addon-tester
|
19
|
+
|
20
|
+
|
14
21
|
2) Create a manifest.json that points to a test addon
|
15
22
|
|
16
23
|
Example
|
@@ -35,7 +42,13 @@ Example
|
|
35
42
|
|
36
43
|
## Usage ##
|
37
44
|
|
38
|
-
|
45
|
+
If cloned:
|
46
|
+
|
47
|
+
$ bin/af-addon-tester <path to manifest>
|
48
|
+
|
49
|
+
If Gem
|
50
|
+
|
51
|
+
$ $ af-addon-tester <path to manifest>
|
39
52
|
|
40
53
|
|
41
54
|
## Meta ##
|
data/bin/af-addon-tester
CHANGED
@@ -17,6 +17,7 @@ begin
|
|
17
17
|
|
18
18
|
raise "Missing id" if manifest['id'].nil?
|
19
19
|
raise "Missing api section" if manifest['api'].nil?
|
20
|
+
raise "Missing api password" if manifest['api']['username'].nil?
|
20
21
|
raise "Missing api password" if manifest['api']['password'].nil?
|
21
22
|
raise "Missing apt test url" if manifest['api']['test'].nil?
|
22
23
|
raise "Manifest must have atleast one plan" if manifest['api']['plans'].nil? || manifest['api']['plans'][0].nil? || manifest['api']['plans'][0]['id'].nil?
|
@@ -33,7 +34,7 @@ config_prefix = manifest['id'].gsub('-','_').upcase + '_'
|
|
33
34
|
bad_user = 'bad_user'
|
34
35
|
bad_password = 'bad_pass'
|
35
36
|
|
36
|
-
addon = Rest.new(manifest['api']['test'], manifest['
|
37
|
+
addon = Rest.new(manifest['api']['test'], manifest['api']['username'], manifest['api']['password'])
|
37
38
|
resp = nil
|
38
39
|
|
39
40
|
validate "Provisioning" do
|
@@ -120,7 +121,7 @@ end
|
|
120
121
|
_, json = out.split("\r\n\r\n")
|
121
122
|
begin
|
122
123
|
callback_info = JSON.parse(json)
|
123
|
-
rescue Exception => e
|
124
|
+
rescue Exception => e
|
124
125
|
failed e.message
|
125
126
|
end
|
126
127
|
isValidCallback = true
|