@@ -301,7 +301,10 @@ def test_get_clients(_load_kube_config_mock, list_clients_mock: AsyncMock):
301301 kind = "Exporter" ,
302302 metadata = V1ObjectMeta (name = "test" , namespace = "testing" , creation_timestamp = "2024-01-01T21:00:00Z" ),
303303 status = V1Alpha1ExporterStatus (
304- endpoint = "grpc://example.com:443" , credential = V1ObjectReference (name = "test-credential" ), devices = []
304+ endpoint = "grpc://example.com:443" ,
305+ credential = V1ObjectReference (name = "test-credential" ),
306+ devices = [],
307+ exporter_status = "Available" ,
305308 ),
306309)
307310
@@ -318,7 +321,9 @@ def test_get_clients(_load_kube_config_mock, list_clients_mock: AsyncMock):
318321 "name": "test-credential"
319322 },
320323 "devices": [],
321- "endpoint": "grpc://example.com:443"
324+ "endpoint": "grpc://example.com:443",
325+ "exporterStatus": "Available",
326+ "statusMessage": null
322327 }
323328}
324329"""
@@ -334,6 +339,8 @@ def test_get_clients(_load_kube_config_mock, list_clients_mock: AsyncMock):
334339 name: test-credential
335340 devices: []
336341 endpoint: grpc://example.com:443
342+ exporterStatus: Available
343+ statusMessage: null
337344
338345"""
339346
@@ -348,6 +355,7 @@ def test_get_exporter(_load_kube_config_mock, get_exporter_mock: AsyncMock):
348355 result = runner .invoke (get , ["exporter" , "test" ])
349356 assert result .exit_code == 0
350357 assert "test" in result .output
358+ assert "Available" in result .output
351359 assert "grpc://example.com:443" in result .output
352360 get_exporter_mock .reset_mock ()
353361
@@ -396,6 +404,7 @@ def test_get_exporter(_load_kube_config_mock, get_exporter_mock: AsyncMock):
396404 V1Alpha1ExporterDevice (labels = {"hardware" : "rpi4" }, uuid = "82a8ac0d-d7ff-4009-8948-18a3c5c607b1" ),
397405 V1Alpha1ExporterDevice (labels = {"hardware" : "rpi4" }, uuid = "f7cd30ac-64a3-42c6-ba31-b25f033b97c1" ),
398406 ],
407+ exporter_status = "Available" ,
399408 ),
400409)
401410
@@ -425,7 +434,9 @@ def test_get_exporter(_load_kube_config_mock, get_exporter_mock: AsyncMock):
425434 "uuid": "f7cd30ac-64a3-42c6-ba31-b25f033b97c1"
426435 }
427436 ],
428- "endpoint": "grpc://example.com:443"
437+ "endpoint": "grpc://example.com:443",
438+ "exporterStatus": "Available",
439+ "statusMessage": null
429440 }
430441}
431442"""
@@ -447,6 +458,8 @@ def test_get_exporter(_load_kube_config_mock, get_exporter_mock: AsyncMock):
447458 hardware: rpi4
448459 uuid: f7cd30ac-64a3-42c6-ba31-b25f033b97c1
449460 endpoint: grpc://example.com:443
461+ exporterStatus: Available
462+ statusMessage: null
450463
451464"""
452465
@@ -460,6 +473,7 @@ def test_get_exporter_devices(_load_kube_config_mock, get_exporter_mock: AsyncMo
460473 result = runner .invoke (get , ["exporter" , "test" , "--devices" ])
461474 assert result .exit_code == 0
462475 assert "test" in result .output
476+ assert "Available" in result .output
463477 assert "grpc://example.com:443" in result .output
464478 assert "hardware:rpi4" in result .output
465479 assert "82a8ac0d-d7ff-4009-8948-18a3c5c607b1" in result .output
@@ -510,6 +524,7 @@ def test_get_exporter_devices(_load_kube_config_mock, get_exporter_mock: AsyncMo
510524 endpoint = "grpc://example.com:443" ,
511525 credential = V1ObjectReference (name = "test-credential" ),
512526 devices = [],
527+ exporter_status = "Available" ,
513528 ),
514529 ),
515530 V1Alpha1Exporter (
@@ -520,6 +535,7 @@ def test_get_exporter_devices(_load_kube_config_mock, get_exporter_mock: AsyncMo
520535 endpoint = "grpc://example.com:443" ,
521536 credential = V1ObjectReference (name = "another-credential" ),
522537 devices = [],
538+ exporter_status = "Available" ,
523539 ),
524540 ),
525541 ]
@@ -541,7 +557,9 @@ def test_get_exporter_devices(_load_kube_config_mock, get_exporter_mock: AsyncMo
541557 "name": "test-credential"
542558 },
543559 "devices": [],
544- "endpoint": "grpc://example.com:443"
560+ "endpoint": "grpc://example.com:443",
561+ "exporterStatus": "Available",
562+ "statusMessage": null
545563 }
546564 },
547565 {
@@ -557,7 +575,9 @@ def test_get_exporter_devices(_load_kube_config_mock, get_exporter_mock: AsyncMo
557575 "name": "another-credential"
558576 },
559577 "devices": [],
560- "endpoint": "grpc://example.com:443"
578+ "endpoint": "grpc://example.com:443",
579+ "exporterStatus": "Available",
580+ "statusMessage": null
561581 }
562582 }
563583 ],
@@ -578,6 +598,8 @@ def test_get_exporter_devices(_load_kube_config_mock, get_exporter_mock: AsyncMo
578598 name: test-credential
579599 devices: []
580600 endpoint: grpc://example.com:443
601+ exporterStatus: Available
602+ statusMessage: null
581603- apiVersion: jumpstarter.dev/v1alpha1
582604 kind: Exporter
583605 metadata:
@@ -589,6 +611,8 @@ def test_get_exporter_devices(_load_kube_config_mock, get_exporter_mock: AsyncMo
589611 name: another-credential
590612 devices: []
591613 endpoint: grpc://example.com:443
614+ exporterStatus: Available
615+ statusMessage: null
592616kind: ExporterList
593617
594618"""
@@ -609,6 +633,7 @@ def test_get_exporters(_load_kube_config_mock, list_exporters_mock: AsyncMock):
609633 assert result .exit_code == 0
610634 assert "test" in result .output
611635 assert "another" in result .output
636+ assert "Available" in result .output
612637 list_exporters_mock .reset_mock ()
613638
614639 # List exporters JSON output
@@ -655,6 +680,7 @@ def test_get_exporters(_load_kube_config_mock, list_exporters_mock: AsyncMock):
655680 devices = [
656681 V1Alpha1ExporterDevice (labels = {"hardware" : "rpi4" }, uuid = "82a8ac0d-d7ff-4009-8948-18a3c5c607b1" )
657682 ],
683+ exporter_status = "Available" ,
658684 ),
659685 ),
660686 V1Alpha1Exporter (
@@ -667,6 +693,7 @@ def test_get_exporters(_load_kube_config_mock, list_exporters_mock: AsyncMock):
667693 devices = [
668694 V1Alpha1ExporterDevice (labels = {"hardware" : "rpi4" }, uuid = "f7cd30ac-64a3-42c6-ba31-b25f033b97c1" ),
669695 ],
696+ exporter_status = "Available" ,
670697 ),
671698 ),
672699 ]
@@ -695,7 +722,9 @@ def test_get_exporters(_load_kube_config_mock, list_exporters_mock: AsyncMock):
695722 "uuid": "82a8ac0d-d7ff-4009-8948-18a3c5c607b1"
696723 }
697724 ],
698- "endpoint": "grpc://example.com:443"
725+ "endpoint": "grpc://example.com:443",
726+ "exporterStatus": "Available",
727+ "statusMessage": null
699728 }
700729 },
701730 {
@@ -718,7 +747,9 @@ def test_get_exporters(_load_kube_config_mock, list_exporters_mock: AsyncMock):
718747 "uuid": "f7cd30ac-64a3-42c6-ba31-b25f033b97c1"
719748 }
720749 ],
721- "endpoint": "grpc://example.com:443"
750+ "endpoint": "grpc://example.com:443",
751+ "exporterStatus": "Available",
752+ "statusMessage": null
722753 }
723754 }
724755 ],
@@ -742,6 +773,8 @@ def test_get_exporters(_load_kube_config_mock, list_exporters_mock: AsyncMock):
742773 hardware: rpi4
743774 uuid: 82a8ac0d-d7ff-4009-8948-18a3c5c607b1
744775 endpoint: grpc://example.com:443
776+ exporterStatus: Available
777+ statusMessage: null
745778- apiVersion: jumpstarter.dev/v1alpha1
746779 kind: Exporter
747780 metadata:
@@ -756,6 +789,8 @@ def test_get_exporters(_load_kube_config_mock, list_exporters_mock: AsyncMock):
756789 hardware: rpi4
757790 uuid: f7cd30ac-64a3-42c6-ba31-b25f033b97c1
758791 endpoint: grpc://example.com:443
792+ exporterStatus: Available
793+ statusMessage: null
759794kind: ExporterList
760795
761796"""
@@ -774,6 +809,7 @@ def test_get_exporters_devices(_load_kube_config_mock, list_exporters_mock: Asyn
774809 assert result .exit_code == 0
775810 assert "test" in result .output
776811 assert "another" in result .output
812+ assert "Available" in result .output
777813 assert "hardware:rpi4" in result .output
778814 assert "82a8ac0d-d7ff-4009-8948-18a3c5c607b1" in result .output
779815 assert "f7cd30ac-64a3-42c6-ba31-b25f033b97c1" in result .output
0 commit comments