Skip to content

Commit

Permalink
fix travis build problems
Browse files Browse the repository at this point in the history
remove old access key and secret key in code
  • Loading branch information
jemygraw committed Jun 22, 2017
1 parent ea976f1 commit 9a3a104
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/qiniu/common/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public final class Constants {
/**
* 版本号
*/
public static final String VERSION = "7.2.5";
public static final String VERSION = "7.2.7";
/**
* 块大小,不能改变
*/
Expand Down
5 changes: 3 additions & 2 deletions src/main/java/com/qiniu/storage/BucketManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,14 @@ public String[] buckets() throws QiniuException {

/**
* 获取该空间下所有的domain
*
* @param bucket
* @return 该空间名下的domain
* @throws QiniuException
*/

public String[] domainList (String bucket) throws QiniuException{
String url = String.format("%s/v6/domain/list?tbl=%s", "http://api.qiniu.com" ,bucket);
public String[] domainList(String bucket) throws QiniuException {
String url = String.format("%s/v6/domain/list?tbl=%s", "http://api.qiniu.com", bucket);
Response r = get(url);
return r.jsonToObject(String[].class);
}
Expand Down
4 changes: 4 additions & 0 deletions src/test/java/com/qiniu/CdnTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ public void testCreateTimestampAntiLeechUrlSimple6() throws MalformedURLExceptio
long deadline = 1438358400;
String encryptKey = "12345678";
String signedUrl;
// CHECKSTYLE:OFF
String ret = "http://xxx.yyy.com/DIR1/dir2/vodfile.mp4?v=1.1&sign=19eb212771e87cc3d478b9f32d6c7bf9&t=55bb9b80";
// CHECKSTYLE:ON
try {
signedUrl = CdnManager.createTimestampAntiLeechUrl(url, encryptKey, deadline);
Assert.assertEquals(ret, signedUrl);
Expand All @@ -248,7 +250,9 @@ public void testCreateTimestampAntiLeechUrlSimple7() throws MalformedURLExceptio
long deadline = 1438358400;
String encryptKey = "12345678";
String signedUrl;
// CHECKSTYLE:OFF
String ret = "http://xxx.yyy.com/DIR1/%E4%B8%AD%E6%96%87/vodfile.mp4?v=1.2&sign=6356bca0d2aecf7211003e468861f5ea&t=55bb9b80";
// CHECKSTYLE:ON
try {
signedUrl = CdnManager.createTimestampAntiLeechUrl(url, encryptKey, deadline);
Assert.assertEquals(ret, signedUrl);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/com/qiniu/TestConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ public final class TestConfig {


//valid ak & sk
public static final String testAccessKey = "QWYn5TFQsLLU1pL5MFEmX3s5DmHdUThav9WyOWOm";
public static final String testSecretKey = "Bxckh6FA-Fbs9Yt3i3cbKVK22UPBmAOHJcL95pGz";
public static final String testAccessKey = System.getenv("QINIU_ACCESS_KEY");
public static final String testSecretKey = System.getenv("QINIU_SECRET_KEY");
public static final Auth testAuth = Auth.create(testAccessKey, testSecretKey);

//z0
Expand Down

0 comments on commit 9a3a104

Please sign in to comment.