Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Inventory reporting e2e tests. #782

Merged
merged 1 commit into from
Jan 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions e2e_tests/test_suites/inventoryreporting/test_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ var (
timeout: 30 * time.Minute,
itemCheck: func(items map[string]*osconfigpb.Inventory_Item) error {
var foundGooget bool
var foundCowsay bool
var foundGoogleComputeEngineSSH bool
var qfeExists bool
var wuaExists bool
var windowsApplicationExist bool
Expand All @@ -64,8 +64,8 @@ var (
if item.GetInstalledPackage().GetGoogetPackage().GetPackageName() == "googet" {
foundGooget = true
}
if item.GetAvailablePackage().GetGoogetPackage().GetPackageName() == "cowsay" {
foundCowsay = true
if item.GetAvailablePackage().GetGoogetPackage().GetPackageName() == "google-compute-engine-ssh" {
foundGoogleComputeEngineSSH = true
}
if item.GetInstalledPackage().GetQfePackage() != nil {
qfeExists = true
Expand All @@ -86,8 +86,8 @@ var (
if !foundGooget {
return errors.New("did not find 'googet' in installed packages")
}
if !foundCowsay {
return errors.New("did not find 'cowsay' in available packages")
if !foundGoogleComputeEngineSSH {
return errors.New("did not find 'google-compute-engine-ssh' in available packages")
}
if !qfeExists {
return errors.New("did not find any QFE installed package")
Expand Down Expand Up @@ -267,7 +267,7 @@ func getStartupScriptGoo() string {
ss := `
echo 'Adding test repo'
googet addrepo test https://packages.cloud.google.com/yuck/repos/osconfig-agent-test-repository
googet -noconfirm install cowsay.x86_64.0.1.0@1
googet -noconfirm install google-compute-engine-ssh
%s`
return fmt.Sprintf(ss, utils.InstallOSConfigGooGet())
}
Expand Down
Loading