Skip to content

Commit

Permalink
change available package check (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
burov authored Jan 22, 2025
1 parent 9820bc2 commit c2f9481
Showing 1 changed file with 6 additions and 6 deletions.
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 foundGoogleComputeEngineSSH bool
var foundGoogleComputeEngineDriverGvnic bool
var qfeExists bool
var wuaExists bool
var windowsApplicationExist bool
Expand All @@ -60,12 +60,13 @@ var (
"Google Cloud SDK": false,
}

fmt.Println(items)
for _, item := range items {
if item.GetInstalledPackage().GetGoogetPackage().GetPackageName() == "googet" {
foundGooget = true
}
if item.GetAvailablePackage().GetGoogetPackage().GetPackageName() == "google-compute-engine-ssh" {
foundGoogleComputeEngineSSH = true
if item.GetAvailablePackage().GetGoogetPackage().GetPackageName() == "google-compute-engine-driver-gvnic" {
foundGoogleComputeEngineDriverGvnic = true
}
if item.GetInstalledPackage().GetQfePackage() != nil {
qfeExists = true
Expand All @@ -86,8 +87,8 @@ var (
if !foundGooget {
return errors.New("did not find 'googet' in installed packages")
}
if !foundGoogleComputeEngineSSH {
return errors.New("did not find 'google-compute-engine-ssh' in available packages")
if !foundGoogleComputeEngineDriverGvnic {
return errors.New("did not find 'google-compute-engine-driver-gvnic' in available packages")
}
if !qfeExists {
return errors.New("did not find any QFE installed package")
Expand Down Expand Up @@ -267,7 +268,6 @@ 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 google-compute-engine-ssh
%s`
return fmt.Sprintf(ss, utils.InstallOSConfigGooGet())
}
Expand Down

0 comments on commit c2f9481

Please sign in to comment.