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

Update api test to use graph api for changing system language #7764

Closed
ScharfViktor opened this issue Nov 20, 2023 · 5 comments · Fixed by #7817
Closed

Update api test to use graph api for changing system language #7764

ScharfViktor opened this issue Nov 20, 2023 · 5 comments · Fixed by #7817
Assignees
Labels

Comments

@ScharfViktor
Copy link
Contributor

ScharfViktor commented Nov 20, 2023

Language change using graph: #7817
curl --insecure -XPATCH -uadmin:admin https://localhost:9200/graph/v1.0/me -d '{"preferredLanguage":"de"}'
change Given step And user "Brian" has switched the system language to "es" to using graph

@SwikritiT
Copy link
Contributor

SwikritiT commented Nov 28, 2023

@ScharfViktor for Language change using graph: are you suggesting that we change the step And user "Brian" has switched the system language to "es" to use graph API entirely ? or should we cover both the cases for

And user "Brian" has switched the system language to "es" using the Graph API
And user "Brian" has switched the system language to "es" using the settings API

@SwikritiT
Copy link
Contributor

SwikritiT commented Nov 28, 2023

@ScharfViktor has the feature for changing language using graph already been implemented? I'm getting 405.

curl -XPOST -uadmin:admin https://localhost:9200/graph/v1.0/me -d '{"preferredLanguage":"de"}' -vk 
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1:9200...
* Connected to localhost (127.0.0.1) port 9200 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: O=Acme Corp; CN=OCIS
*  start date: Nov 28 05:59:51 2023 GMT
*  expire date: Nov 27 05:59:51 2024 GMT
*  issuer: O=Acme Corp; CN=OCIS
*  SSL certificate verify result: self-signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> POST /graph/v1.0/me HTTP/1.1
> Host: localhost:9200
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.81.0
> Accept: */*
> Content-Length: 26
> Content-Type: application/x-www-form-urlencoded
> 
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Mark bundle as not supporting multiuse
< HTTP/1.1 405 Method Not Allowed
< Allow: GET
< Allow: PATCH
< Content-Length: 0
< Content-Security-Policy: frame-ancestors 'none'
< Date: Tue, 28 Nov 2023 06:04:08 GMT
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Frame-Options: DENY
< X-Graph-Version: 5.0.0-alpha.3+4a94388a25
< X-Request-Id: swikriti-OptiPlex-3070/QBrGWJWQhf-000493
< 
* Connection #0 to host localhost left intact

@SwikritiT
Copy link
Contributor

SwikritiT commented Nov 28, 2023

@ScharfViktor has the feature for changing language using graph already been implemented? I'm getting 405

curl -XPOST -uadmin:admin https://localhost:9200/graph/v1.0/me -d '{"preferredLanguage":"de"}' -vk 
Note: Unnecessary use of -X or --request, POST is already inferred.
*   Trying 127.0.0.1:9200...
* Connected to localhost (127.0.0.1) port 9200 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* TLSv1.0 (OUT), TLS header, Certificate Status (22):
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS header, Certificate Status (22):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS header, Finished (20):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.2 (OUT), TLS header, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN, server did not agree to a protocol
* Server certificate:
*  subject: O=Acme Corp; CN=OCIS
*  start date: Nov 28 05:59:51 2023 GMT
*  expire date: Nov 27 05:59:51 2024 GMT
*  issuer: O=Acme Corp; CN=OCIS
*  SSL certificate verify result: self-signed certificate (18), continuing anyway.
* Server auth using Basic with user 'admin'
* TLSv1.2 (OUT), TLS header, Supplemental data (23):
> POST /graph/v1.0/me HTTP/1.1
> Host: localhost:9200
> Authorization: Basic YWRtaW46YWRtaW4=
> User-Agent: curl/7.81.0
> Accept: */*
> Content-Length: 26
> Content-Type: application/x-www-form-urlencoded
> 
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.2 (IN), TLS header, Supplemental data (23):
* Mark bundle as not supporting multiuse
< HTTP/1.1 405 Method Not Allowed
< Allow: GET
< Allow: PATCH
< Content-Length: 0
< Content-Security-Policy: frame-ancestors 'none'
< Date: Tue, 28 Nov 2023 06:04:08 GMT
< Vary: Origin
< X-Content-Type-Options: nosniff
< X-Frame-Options: DENY
< X-Graph-Version: 5.0.0-alpha.3+4a94388a25
< X-Request-Id: swikriti-OptiPlex-3070/QBrGWJWQhf-000493
< 
* Connection #0 to host localhost left intact

The request is PATCH. It works.

@SwikritiT SwikritiT changed the title new api tests Update api test to use graph api for changing system language Nov 28, 2023
@ScharfViktor
Copy link
Contributor Author

@ScharfViktor for Language change using graph: are you suggesting that we change the step And user "Brian" has switched the system language to "es" to use graph API entirely ? or should we cover both the cases for

done here #7817

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants