diff --git a/spec/manageiq-operator/go_version_spec.rb b/spec/manageiq-operator/go_version_spec.rb index 7b661a6ef..d4ca7873d 100644 --- a/spec/manageiq-operator/go_version_spec.rb +++ b/spec/manageiq-operator/go_version_spec.rb @@ -3,7 +3,7 @@ require 'awesome_spawn' dockerfile_version = File.read(ROOT.join("manageiq-operator", "Dockerfile")).match(/^FROM.+golang:(\d+\.\d+).+/)[1] mod_version = File.read(ROOT.join("manageiq-operator", "go.mod")).match(/^go\s(\d+\.\d+)/)[1] - running_version = AwesomeSpawn.run!("go version").output.match(/.*\sgo(\d+\.\d+).*/)[1] + running_version = AwesomeSpawn.run!("go version", :chdir => ROOT.join("manageiq-operator")).output.match(/.*\sgo(\d+\.\d+).*/)[1] expect(dockerfile_version).to eq(mod_version) expect(running_version).to eq(mod_version)