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

feat(uiExtension): extend UI manifest file properties #45

Merged
merged 3 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
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
9 changes: 7 additions & 2 deletions pkg/c8y/uiExtension.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,17 @@ func (m *UIManifest) WithPackage(v string) *UIManifest {

type UIManifestFile struct {
Name string `json:"name,omitempty"`
Version string `json:"version,omitempty"`
Key string `json:"key,omitempty"`
ContextPath string `json:"contextPath,omitempty"`
Description string `json:"description,omitempty"`
Package string `json:"package,omitempty"`
IsPackage bool `json:"isPackage,omitempty"`
Version string `json:"version,omitempty"`

Author string `json:"author"`
Description string `json:"description,omitempty"`
License string `json:"license"`
Remotes map[string][]string `json:"remotes"`
RequiredPlatformVersion string `json:"requiredPlatformVersion"`
}

const CumulocityUIManifestFile = "cumulocity.json"
Expand Down
5 changes: 4 additions & 1 deletion test/c8y_test/measurement_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ func TestMeasurementService_DeleteMeasurements(t *testing.T) {
testDevice, err := createRandomTestDevice()
testingutils.Ok(t, err)

valueFragmentType := "nx_Type1"
valueFragmentType := "nx_Type1_" + testingutils.RandomString(5)
createMeasVariable1 := measurementFactory(client, testDevice.ID, valueFragmentType, "Variable1")
createMeasVariable2 := measurementFactory(client, testDevice.ID, valueFragmentType, "Variable2")

Expand All @@ -400,6 +400,8 @@ func TestMeasurementService_DeleteMeasurements(t *testing.T) {
ValueFragmentType: valueFragmentType,
}

// Wait for measurements to be created
time.Sleep(2 * time.Second)
measCol1, resp, err := client.Measurement.GetMeasurements(
context.Background(),
searchOptions,
Expand All @@ -420,6 +422,7 @@ func TestMeasurementService_DeleteMeasurements(t *testing.T) {
// Check that the measurements have been removed
// Check by requesting the new collection again as retrieving single measurements
// is no longer supported by Cumulocity IoT
time.Sleep(2 * time.Second) // give server some time to delete the measurements
measColAfter, resp, err := client.Measurement.GetMeasurements(
context.Background(),
searchOptions,
Expand Down