openyurt
openyurt copied to clipboard
[feature request] Add device synchronization e2e test for yurt-iot-dock
What would you like to be added: After the completion of the e2e of the iot system, we need to write the e2e test case for the yurt-iot-dock. We hope to test whether the yurt-iot-dock can synchronize the device related information of edgex.
- First, the current e2e test already creates
PlatformAdmin
, so you need to addyurt-iot-dock
component.
apiVersion: iot.openyurt.io/v1alpha2
kind: PlatformAdmin
metadata:
name: edgex-sample
spec:
version: minnesota
poolName: hangzhou
components:
- name: yurt-iot-dock
-
Then check whether PlatformAdmin is still ready after deploying yurt-iot-dock, and check whether Device, DeviceProfile, and DeviceService are empty.
-
Update PlatformAdmin again to add virtual devices and virtual device services.
apiVersion: iot.openyurt.io/v1alpha2
kind: PlatformAdmin
metadata:
name: edgex-sample
spec:
version: minnesota
poolName: hangzhou
components:
- name: yurt-iot-dock
- name: edgex-device-virtual
- name: edgex-device-rest
-
Check that PlatformAdmin is ready again.
-
Then check whether the corresponding Device, DeviceProfile, and DeviceService are deployed.
$ kubectl get deviceservice
NAME NODEPOOL SYNCED AGE
hangzhou-device-virtual hangzhou true 2d1h
$ kubectl get device
NAME NODEPOOL SYNCED AGE
hangzhou-random-binary-device hangzhou true 2d1h
hangzhou-random-boolean-device hangzhou true 2d1h
hangzhou-random-float-device hangzhou true 2d1h
hangzhou-random-integer-device hangzhou true 2d1h
hangzhou-random-unsignedinteger-device hangzhou true 2d1h
$ kubectl get deviceprofile
NAME NODEPOOL SYNCED AGE
hangzhou-random-binary-device hangzhou true 2d1h
hangzhou-random-boolean-device hangzhou true 2d1h
hangzhou-random-float-device hangzhou true 2d1h
hangzhou-random-integer-device hangzhou true 2d1h
hangzhou-random-unsignedinteger-device hangzhou true 2d1h
As an easy way, you can directly determine if none of the three CR quantities are zero.
Reference for more details on iot: https://openyurt.io/zh/docs/next/user-manuals/iot/edgex-foundry
Why is this needed: Improve e2e testing for iot.
others /kind feature
I want to help with this issue
/assign @NewKeyTo
@NewKeyTo Please wait for pr #1750 to be merged.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
/reopen
@NewKeyTo This issue can begin to be resolved, #1750 has been merged.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.