require 'test_helper' class Backends::TerraformLibvirtTest < ActiveSupport::TestCase setup do @backend = Backends::TerraformLibvirt.new @mini_environment = MiniEnvironment.new( id: 1, name: 'Test Mini Environment', backend_data: { 'build_output' => '/gnu/store/testbuildoutput' } ) end test 'type_and_id' do @backend.type_and_id end test 'build' do GovukGuix::UpdateGcrootsDirectory.stubs(:add_store_path) GovukGuix::BuildMiniEnvironment.expects(:build) @backend.build(@mini_environment) end test 'start' do RubyTerraform.stubs(:init) RubyTerraform.expects(:apply) @backend.start(@mini_environment) end test 'destroy' do RubyTerraform.stubs(:init) RubyTerraform.expects(:destroy) @backend.destroy(@mini_environment) end test 'signon_url' do @backend.signon_url(@mini_environment) end test 'terraform_variables' do @backend.terraform_variables(@mini_environment) end end