Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit 497d788

Browse files
committed
Fix CloudantClientTests#testBasicAuth
1 parent 9043358 commit 497d788

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

cloudant-client/src/test/java/com/cloudant/tests/CloudantClientHelper.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2015, 2019 IBM Corp. All rights reserved.
2+
* Copyright © 2015, 2021 IBM Corp. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
55
* except in compliance with the License. You may obtain a copy of the License at
@@ -36,12 +36,13 @@ public abstract class CloudantClientHelper {
3636
static final String SERVER_USER;
3737
static final String SERVER_PASSWORD;
3838
static final String SERVER_HOST;
39+
//some tests need access to the URL
40+
static final URL SERVER_URL;
3941

4042
private static final CloudantClient CLIENT_INSTANCE;
4143

4244
private static final String SERVER_PORT;
4345
private static final String SERVER_PROTOCOL;
44-
private static final URL SERVER_URL;
4546

4647
static {
4748

cloudant-client/src/test/java/com/cloudant/tests/CloudantClientTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright © 2015, 2019 IBM Corp. All rights reserved.
2+
* Copyright © 2015, 2021 IBM Corp. All rights reserved.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
55
* except in compliance with the License. You may obtain a copy of the License at
@@ -500,7 +500,7 @@ public void testBasicAuth() throws IOException {
500500
new BasicAuthInterceptor(CloudantClientHelper.SERVER_USER
501501
+ ":" + CloudantClientHelper.SERVER_PASSWORD);
502502

503-
CloudantClient client = ClientBuilder.account(CloudantClientHelper.SERVER_USER)
503+
CloudantClient client = ClientBuilder.url(CloudantClientHelper.SERVER_URL)
504504
.interceptors(interceptor).build();
505505

506506
// Test passes if there are no exceptions

0 commit comments

Comments
 (0)