Skip to content

Commit

Permalink
change test values
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam0Brien committed Nov 15, 2024
1 parent 5b89d7e commit 9825cba
Showing 1 changed file with 41 additions and 41 deletions.
82 changes: 41 additions & 41 deletions test/e2e/inventory_http_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ func TestInventoryAPIHTTP_CreateRHELHost(t *testing.T) {
request := resources.CreateRhelHostRequest{RhelHost: &resources.RhelHost{
Metadata: &resources.Metadata{
ResourceType: "rhel-host",
WorkspaceId: "workspace1",
WorkspaceId: "workspace0",
OrgId: "",
},
ReporterData: &resources.ReporterData{
ReporterInstanceId: "user@example.com",
ReporterInstanceId: "user@email.com",
ReporterType: resources.ReporterData_OCM,
ConsoleHref: "www.example.com",
ApiHref: "www.example.com",
LocalResourceId: "1",
ReporterVersion: "0.1",
ConsoleHref: "www.web.com",
ApiHref: "www.wb.com",
LocalResourceId: "0123",
ReporterVersion: "0.2",
},
}}
opts := getCallOptions()
Expand All @@ -182,18 +182,18 @@ func TestInventoryAPIHTTP_UpdateRHELHost(t *testing.T) {
}

reporterData := &resources.ReporterData{
ReporterInstanceId: "user@example1.com",
ReporterType: resources.ReporterData_ACM,
ConsoleHref: "www.example.com",
ApiHref: "www.example.com",
LocalResourceId: "2",
ReporterVersion: "0.1",
ReporterInstanceId: "user@email.com",
ReporterType: resources.ReporterData_OCM,
ConsoleHref: "www.web.com",
ApiHref: "www.wb.com",
LocalResourceId: "0123",
ReporterVersion: "0.2",
}

request := resources.UpdateRhelHostRequest{RhelHost: &resources.RhelHost{
Metadata: &resources.Metadata{
ResourceType: "rhel-host",
WorkspaceId: "workspace1",
WorkspaceId: "workspace0",
OrgId: "",
},
ReporterData: reporterData,
Expand All @@ -217,12 +217,12 @@ func TestInventoryAPIHTTP_DeleteRHELHost(t *testing.T) {
}

reporter := &resources.ReporterData{
ReporterInstanceId: "user@example1.com",
ReporterType: resources.ReporterData_ACM,
ConsoleHref: "www.example.com",
ApiHref: "www.example.com",
LocalResourceId: "2",
ReporterVersion: "0.1",
ReporterInstanceId: "user@email.com",
ReporterType: resources.ReporterData_OCM,
ConsoleHref: "www.web.com",
ApiHref: "www.wb.com",
LocalResourceId: "0123",
ReporterVersion: "0.2",
}

request1 := resources.DeleteRhelHostRequest{
Expand All @@ -249,25 +249,25 @@ func TestInventoryAPIHTTP_K8SCluster_CreateK8SCluster(t *testing.T) {
K8SCluster: &resources.K8SCluster{
Metadata: &resources.Metadata{
ResourceType: "k8s-cluster",
WorkspaceId: "",
WorkspaceId: "workspace1",
OrgId: "",
},
ResourceData: &resources.K8SClusterDetail{
ExternalClusterId: "1234",
ExternalClusterId: "01234",
ClusterStatus: resources.K8SClusterDetail_READY,
KubeVersion: "1.31",
KubeVendor: resources.K8SClusterDetail_OPENSHIFT,
VendorVersion: "4.16",
CloudPlatform: resources.K8SClusterDetail_AWS_UPI,
Nodes: []*resources.K8SClusterDetailNodesInner{
{
Name: "www.example.com",
Name: "www.web.com",
Cpu: "7500m",
Memory: "30973224Ki",
Labels: []*resources.ResourceLabel{
{
Key: "has_monster_gpu",
Value: "yes",
Value: "no",
},
},
},
Expand All @@ -278,7 +278,7 @@ func TestInventoryAPIHTTP_K8SCluster_CreateK8SCluster(t *testing.T) {
ReporterType: resources.ReporterData_ACM,
ConsoleHref: "www.example.com",
ApiHref: "www.example.com",
LocalResourceId: "1",
LocalResourceId: "01234",
ReporterVersion: "0.1",
},
},
Expand All @@ -303,36 +303,36 @@ func TestInventoryAPIHTTP_K8SCluster_UpdateK8SCluster(t *testing.T) {
K8SCluster: &resources.K8SCluster{
Metadata: &resources.Metadata{
ResourceType: "k8s-cluster",
WorkspaceId: "",
WorkspaceId: "workspace1",
OrgId: "",
},
ResourceData: &resources.K8SClusterDetail{
ExternalClusterId: "1234",
ExternalClusterId: "01234",
ClusterStatus: resources.K8SClusterDetail_READY,
KubeVersion: "1.31",
KubeVendor: resources.K8SClusterDetail_OPENSHIFT,
VendorVersion: "4.16",
CloudPlatform: resources.K8SClusterDetail_AWS_UPI,
Nodes: []*resources.K8SClusterDetailNodesInner{
{
Name: "www.example1.com",
Name: "www.web.com",
Cpu: "7500m",
Memory: "30973224Ki",
Labels: []*resources.ResourceLabel{
{
Key: "has_a_bad_gpu",
Value: "yes",
Key: "has_monster_gpu",
Value: "no",
},
},
},
},
},
ReporterData: &resources.ReporterData{
ReporterInstanceId: "user@example1.com",
ReporterType: resources.ReporterData_OCM,
ReporterInstanceId: "user@example.com",
ReporterType: resources.ReporterData_ACM,
ConsoleHref: "www.example.com",
ApiHref: "www.example.com",
LocalResourceId: "2",
LocalResourceId: "01234",
ReporterVersion: "0.1",
},
},
Expand All @@ -359,19 +359,19 @@ func TestInventoryAPIHTTP_K8SPolicy_CreateK8SPolicy(t *testing.T) {
K8SPolicy: &resources.K8SPolicy{
Metadata: &resources.Metadata{
ResourceType: "k8s-policy",
WorkspaceId: "default",
WorkspaceId: "workspace2",
OrgId: "",
},
ResourceData: &resources.K8SPolicyDetail{
Disabled: true,
Severity: resources.K8SPolicyDetail_MEDIUM,
Disabled: false,
Severity: resources.K8SPolicyDetail_HIGH,
},
ReporterData: &resources.ReporterData{
ReporterInstanceId: "user@example-a.com",
ReporterInstanceId: "[email protected]",
ReporterType: resources.ReporterData_OCM,
ConsoleHref: "www.example.com",
ApiHref: "www.example.com",
LocalResourceId: "12345",
LocalResourceId: "012345",
ReporterVersion: "0.1",
},
},
Expand All @@ -398,19 +398,19 @@ func TestInventoryAPIHTTP_K8SPolicy_UpdateK8SPolicy(t *testing.T) {
K8SPolicy: &resources.K8SPolicy{
Metadata: &resources.Metadata{
ResourceType: "k8s-policy",
WorkspaceId: "default",
WorkspaceId: "workspace2",
OrgId: "",
},
ResourceData: &resources.K8SPolicyDetail{
Disabled: false,
Severity: resources.K8SPolicyDetail_MEDIUM,
Severity: resources.K8SPolicyDetail_HIGH,
},
ReporterData: &resources.ReporterData{
ReporterInstanceId: "user@example-a.com",
ReporterInstanceId: "[email protected]",
ReporterType: resources.ReporterData_OCM,
ConsoleHref: "www.example.com",
ApiHref: "www.example.com",
LocalResourceId: "12345",
LocalResourceId: "012345",
ReporterVersion: "0.1",
},
},
Expand Down

0 comments on commit 9825cba

Please sign in to comment.