aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-12-31 18:22:12 +0000
committerChristopher Baines <mail@cbaines.net>2019-01-01 02:38:23 +0000
commit3459059ed1f9332a9e71a4a7be5dc5e22e7f6bae (patch)
tree477f63fbc4546ee2947f571b831fb9463e2025b2 /test
parent3e78356904b610aa149dd2e2c30e832408f37acc (diff)
downloadgovuk-mini-environment-admin-3459059ed1f9332a9e71a4a7be5dc5e22e7f6bae.tar
govuk-mini-environment-admin-3459059ed1f9332a9e71a4a7be5dc5e22e7f6bae.tar.gz
Start tracking which store paths are in use
This will enable garbage collection of the Guix store, without removing things that are still in use.
Diffstat (limited to 'test')
-rw-r--r--test/controllers/mini_environments_controller_test.rb13
-rw-r--r--test/models/backends/terraform_aws_test.rb1
-rw-r--r--test/models/backends/terraform_libvirt_test.rb1
3 files changed, 15 insertions, 0 deletions
diff --git a/test/controllers/mini_environments_controller_test.rb b/test/controllers/mini_environments_controller_test.rb
new file mode 100644
index 0000000..8176143
--- /dev/null
+++ b/test/controllers/mini_environments_controller_test.rb
@@ -0,0 +1,13 @@
+require 'integration_test_helper'
+
+class MiniEnvironmentsControllerTest < ActionDispatch::IntegrationTest
+ setup do
+ login_as User.new
+ end
+
+ test 'show' do
+ MiniEnvironment.create
+
+ get mini_environment_path
+ end
+end
diff --git a/test/models/backends/terraform_aws_test.rb b/test/models/backends/terraform_aws_test.rb
index f9a34f3..d782f3c 100644
--- a/test/models/backends/terraform_aws_test.rb
+++ b/test/models/backends/terraform_aws_test.rb
@@ -28,6 +28,7 @@ class Backends::TerraformAwsTest < ActiveSupport::TestCase
end
test 'build' do
+ GovukGuix::UpdateGcrootsDirectory.stubs(:add_store_path)
GovukGuix::BuildMiniEnvironment.expects(:build)
@backend.build(@mini_environment)
diff --git a/test/models/backends/terraform_libvirt_test.rb b/test/models/backends/terraform_libvirt_test.rb
index 056a1c4..fb56dba 100644
--- a/test/models/backends/terraform_libvirt_test.rb
+++ b/test/models/backends/terraform_libvirt_test.rb
@@ -17,6 +17,7 @@ class Backends::TerraformLibvirtTest < ActiveSupport::TestCase
end
test 'build' do
+ GovukGuix::UpdateGcrootsDirectory.stubs(:add_store_path)
GovukGuix::BuildMiniEnvironment.expects(:build)
@backend.build(@mini_environment)