Skip to content

Commit

Permalink
Merge pull request #45 from reubenmiller/feat-add-extension-manifest-…
Browse files Browse the repository at this point in the history
…properties

feat(uiExtension): extend UI manifest file properties
  • Loading branch information
reubenmiller authored Apr 5, 2024
2 parents 88e96c5 + d6dd0a7 commit 9a42da0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
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

0 comments on commit 9a42da0

Please sign in to comment.