@@ -70,4 +70,46 @@ public void testAttest_ValidAttestationRequest(Core core) throws Exception {
7070 private static JsonObject getConfig () {
7171 return new JsonObject ("{ \" aws_kms_jwt_signing_public_keys\" : \" MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAmvwB41qI5Fe41PDbXqcX5uOvSvfKh8l9QV0O3M+NsB4lKqQEP0t1hfoiXTpOgKz1ArYxHsQ2LeXifX4uwEbYJFlpVM+tyQkTWQjBOw6fsLYK2Xk4X2ylNXUUf7x3SDiOVxyvTh3OZW9kqrDBN9JxSoraNLyfw0hhW0SHpfs699SehgbQ7QWep/gVlKRLIz0XAXaZNw24s79ORcQlrCE6YD0PgQmpI/dK5xMML82n6y3qcTlywlGaU7OGIMdD+CTXA3BcOkgXeqZTXNaX1u6jCTa1lvAczun6avp5VZ4TFiuPo+y4rJ3GU+14cyT5NckEcaTKSvd86UdwK5Id9tl3bQIDAQAB\" }" );
7272 }
73+
74+ @ ParameterizedTest (name = "/operator/config - {0}" )
75+ @ MethodSource ({
76+ "suite.core.TestData#baseArgs"
77+ })
78+ public void testOpertorConfig_ValidRequest (Core core ) throws Exception {
79+ JsonNode response = core .getOperatorConfig ();
80+
81+ assertAll ("testOpertorConfig_ValidRequest has valid response" ,
82+ () -> assertNotNull (response ),
83+ () -> assertEquals (1 , response .get ("version" ).asInt ()), // Changed to asInt()
84+ () -> {
85+ JsonNode runtimeConfig = response .get ("runtime_config" );
86+ assertNotNull (runtimeConfig , "runtime_config should not be null" );
87+ assertEquals (3600 , runtimeConfig .get ("identity_token_expires_after_seconds" ).asInt (), "identity_token_expires_after_seconds" );
88+ assertEquals (86400 , runtimeConfig .get ("refresh_token_expires_after_seconds" ).asInt (), "refresh_token_expires_after_seconds" );
89+ assertEquals (900 , runtimeConfig .get ("refresh_identity_token_after_seconds" ).asInt (), "refresh_identity_token_after_seconds" );
90+ assertEquals (2592000 , runtimeConfig .get ("sharing_token_expiry_seconds" ).asInt (), "sharing_token_expiry_seconds" );
91+ }
92+ );
93+ }
94+
95+ @ ParameterizedTest (name = "/operator/config - {0}" )
96+ @ MethodSource ({
97+ "suite.core.TestData#baseArgs"
98+ })
99+ public void testOpertorConfig_ValidEncryptedRequest (Core core ) throws Exception {
100+ JsonNode response = core .getOperatorConfig (true );
101+
102+ assertAll ("testOpertorConfig_ValidEncryptedRequest has valid response" ,
103+ () -> assertNotNull (response ),
104+ () -> assertEquals (1 , response .get ("version" ).asInt ()), // Changed to asInt()
105+ () -> {
106+ JsonNode runtimeConfig = response .get ("runtime_config" );
107+ assertNotNull (runtimeConfig , "runtime_config should not be null" );
108+ assertEquals (3600 , runtimeConfig .get ("identity_token_expires_after_seconds" ).asInt (), "identity_token_expires_after_seconds" );
109+ assertEquals (86400 , runtimeConfig .get ("refresh_token_expires_after_seconds" ).asInt (), "refresh_token_expires_after_seconds" );
110+ assertEquals (900 , runtimeConfig .get ("refresh_identity_token_after_seconds" ).asInt (), "refresh_identity_token_after_seconds" );
111+ assertEquals (2592000 , runtimeConfig .get ("sharing_token_expiry_seconds" ).asInt (), "sharing_token_expiry_seconds" );
112+ }
113+ );
114+ }
73115}
0 commit comments