Clever / wag

sWAGger - Web API Generator
Apache License 2.0
77 stars 6 forks source link

Fix models attributes for DynamoDB generated tests #461

Closed swadkumar closed 1 year ago

swadkumar commented 1 year ago

JIRA: https://clever.atlassian.net/browse/INFRANG-4970

Overview:

What does this change do?

This change attempts to fix wrongly generated models attributes(state/branch) for DynamoDB tests. This can be seen in catapult tests

Why is this change needed?

Previous test file had erroneous models attributes. Current change attempts to fix those.

How was this change tested?

Tested by generating catapult tests using the updated WAG templates and comparing before and after.

Before:

    models.DeploymentV2{
        Application: "string1",
        CreatedAt:   mustTime("2018-03-11T15:04:01+07:00"),
        Environment: "string1",
        ID:          "string1",
        State:       models.BranchDeploying,
    }

After:

    models.DeploymentV2{
        Application: "string1",
        CreatedAt:   mustTime("2018-03-11T15:04:01+07:00"),
        Environment: "string1",
        ID:          "string1",
        State:       models.DeploymentV2StateSummaryDeploying,
    }

Ref doc: https://docs.google.com/document/d/12RNsB3oxNnZA02dHN11CHlCCPk2g2lgibyLESfbpcyo/edit

Checklist: