Skip to content

Commit

Permalink
chore: skip server sdk tests for some cases
Browse files Browse the repository at this point in the history
  • Loading branch information
kuhe committed Oct 4, 2024
1 parent ddb5df8 commit f4d0e14
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 1 addition & 3 deletions clients/client-s3/src/protocols/Aws_restXml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5295,9 +5295,7 @@ export const de_SelectObjectContentCommand = async (
$metadata: deserializeMetadata(output),
});
const data: any = output.body;
if (Object.keys(data ?? {}).length) {
contents.Payload = __expectUnion(de_SelectObjectContentEventStream(data, context));
}
contents.Payload = de_SelectObjectContentEventStream(data, context);
return contents;
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import software.amazon.smithy.typescript.codegen.integration.ProtocolGenerator.GenerationContext;
import software.amazon.smithy.typescript.codegen.util.StringStore;
import software.amazon.smithy.utils.IoUtils;
import software.amazon.smithy.utils.SetUtils;
import software.amazon.smithy.utils.SmithyInternalApi;

/**
Expand Down Expand Up @@ -319,6 +320,16 @@ private static boolean filterProtocolTests(
return true;
}

// not implemented in server sdk.
if (SetUtils.of(
"SDKAppendedGzipAfterProvidedEncoding_restJson1",
"SDKAppliedContentEncoding_restJson1",
"RestJsonHttpPayloadWithUnsetUnion",
"RestJsonMustSupportParametersInContentType"
).contains(testCase.getId()) && settings.generateServerSdk()) {
return true;
}

return false;
}

Expand Down
10 changes: 5 additions & 5 deletions private/aws-restjson-server/test/functional/restjson1.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ it("RestJsonConstantQueryString:ServerRequest", async () => {
/**
* A server should ignore parameters added to the content type
*/
it("RestJsonMustSupportParametersInContentType:ServerRequest", async () => {
it.skip("RestJsonMustSupportParametersInContentType:ServerRequest", async () => {
const testFunction = jest.fn();
testFunction.mockReturnValue(Promise.resolve({}));
const testService: Partial<RestJsonService<{}>> = {
Expand Down Expand Up @@ -3089,7 +3089,7 @@ it("RestJsonHttpPayloadWithUnion:ServerRequest", async () => {
/**
* No payload is sent if the union has no value.
*/
it("RestJsonHttpPayloadWithUnsetUnion:ServerRequest", async () => {
it.skip("RestJsonHttpPayloadWithUnsetUnion:ServerRequest", async () => {
const testFunction = jest.fn();
testFunction.mockReturnValue(Promise.resolve({}));
const testService: Partial<RestJsonService<{}>> = {
Expand Down Expand Up @@ -3181,7 +3181,7 @@ it("RestJsonHttpPayloadWithUnion:ServerResponse", async () => {
/**
* No payload is sent if the union has no value.
*/
it("RestJsonHttpPayloadWithUnsetUnion:ServerResponse", async () => {
it.skip("RestJsonHttpPayloadWithUnsetUnion:ServerResponse", async () => {
class TestService implements Partial<RestJsonService<{}>> {
HttpPayloadWithUnion(input: any, ctx: {}): Promise<HttpPayloadWithUnionServerOutput> {
const response = {} as any;
Expand Down Expand Up @@ -28798,7 +28798,7 @@ it("PostUnionWithJsonNameResponse3:ServerResponse", async () => {
/**
* Compression algorithm encoding is appended to the Content-Encoding header.
*/
it("SDKAppliedContentEncoding_restJson1:ServerRequest", async () => {
it.skip("SDKAppliedContentEncoding_restJson1:ServerRequest", async () => {
const testFunction = jest.fn();
testFunction.mockReturnValue(Promise.resolve({}));
const testService: Partial<RestJsonService<{}>> = {
Expand Down Expand Up @@ -28844,7 +28844,7 @@ it("SDKAppliedContentEncoding_restJson1:ServerRequest", async () => {
* request compression encoding from the HTTP binding.
*
*/
it("SDKAppendedGzipAfterProvidedEncoding_restJson1:ServerRequest", async () => {
it.skip("SDKAppendedGzipAfterProvidedEncoding_restJson1:ServerRequest", async () => {
const testFunction = jest.fn();
testFunction.mockReturnValue(Promise.resolve({}));
const testService: Partial<RestJsonService<{}>> = {
Expand Down

0 comments on commit f4d0e14

Please sign in to comment.