Skip to content

Commit

Permalink
Improved tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dann1 committed Dec 13, 2023
1 parent ba93aa8 commit b9b6e5f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vs*
.DS_Store
Gemfile.lock
vendor/
14 changes: 14 additions & 0 deletions tests/lib/common.rb
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,17 @@ def increase_runtime_hardware(specification, mode = 'multiply')
end
end
end

def strip_consequential_info(specification)
['ID', 'SERVICE_ID'].each do |ri|
specification[SRR].delete(ri)
end

ProvisionEngine::Function::FUNCTIONS.each do |function|
next unless specification[SRR][function]

['VM_ID', 'STATE'].each do |fi|
specification[SRR][function].delete(fi)
end
end
end
1 change: 1 addition & 0 deletions tests/lib/crud.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
runtime = JSON.parse(response.body)
verify_sr_spec(@conf[:specification], runtime)

strip_consequential_info(runtime)
@conf[:runtime] = runtime
end

Expand Down
4 changes: 2 additions & 2 deletions tests/templates/sr_faas_capacity.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"SERVERLESS_RUNTIME": {
"NAME": "Function as a Service",
"FAAS": {
"MEMORY": 111,
"MEMORY": 177,
"CPU": 3,
"DISK_SIZE": 420,
"DISK_SIZE": 1338,
"FLAVOUR": "Function"
},
"SCHEDULING": {
Expand Down

0 comments on commit b9b6e5f

Please sign in to comment.