-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5b89d7e
commit 9825cba
Showing
1 changed file
with
41 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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() | ||
|
@@ -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, | ||
|
@@ -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{ | ||
|
@@ -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", | ||
}, | ||
}, | ||
}, | ||
|
@@ -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", | ||
}, | ||
}, | ||
|
@@ -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", | ||
}, | ||
}, | ||
|
@@ -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", | ||
}, | ||
}, | ||
|
@@ -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", | ||
}, | ||
}, | ||
|