mirror of https://github.com/apache/jclouds.git
Merge pull request #111 from jsonking/master
Fix tests for swift content type errors.
This commit is contained in:
commit
f2b46e1e5f
|
@ -273,8 +273,8 @@ public abstract class CommonSwiftClientLiveTest<C extends CommonSwiftClient> ext
|
|||
}
|
||||
|
||||
protected void testGetObjectContentType(SwiftObject getBlob) {
|
||||
assert getBlob.getPayload().getContentMetadata().getContentType().startsWith("text/plain") : getBlob.getPayload()
|
||||
.getContentMetadata().getContentType();
|
||||
String contentType = getBlob.getPayload().getContentMetadata().getContentType();
|
||||
assert contentType.startsWith("text/plain") || "application/x-www-form-urlencoded".equals(contentType): contentType;
|
||||
}
|
||||
|
||||
private SwiftObject newSwiftObject(String data, String key) throws IOException {
|
||||
|
|
|
@ -22,6 +22,8 @@ import org.jclouds.blobstore.domain.Blob;
|
|||
import org.jclouds.blobstore.integration.internal.BaseBlobIntegrationTest;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author James Murty
|
||||
|
@ -36,11 +38,12 @@ public class SwiftBlobIntegrationLiveTest extends BaseBlobIntegrationTest {
|
|||
// not supported in swift
|
||||
}
|
||||
|
||||
// not supported in swift
|
||||
|
||||
@Override
|
||||
protected void checkContentDisposition(Blob blob, String contentDisposition) {
|
||||
assert blob.getPayload().getContentMetadata().getContentDisposition() == null;
|
||||
assert blob.getMetadata().getContentMetadata().getContentDisposition() == null;
|
||||
// This works for Swift Server 1.4.4/SWauth 1.0.3 but was null in previous versions.
|
||||
// TODO: Better testing for the different versions.
|
||||
super.checkContentDisposition(blob,contentDisposition);
|
||||
}
|
||||
|
||||
// not supported in swift
|
||||
|
|
Loading…
Reference in New Issue