Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MongoStatementIT#testCreateIndexChange fails silently #284

Open
jmayday opened this issue Aug 24, 2022 · 0 comments
Open

MongoStatementIT#testCreateIndexChange fails silently #284

jmayday opened this issue Aug 24, 2022 · 0 comments

Comments

@jmayday
Copy link

jmayday commented Aug 24, 2022

This test fails (silently) when creating index by keys (createIndexNoOptionsTest):

<changeSet id="1" author="alex">
    <ext:createIndex collectionName="createIndexTest">
        <ext:keys>
            { clientId: 1, type: 1}
        </ext:keys>
        <ext:options>
            {unique: true, name: "ui_tppClientId"}
        </ext:options>
    </ext:createIndex>

    <ext:createIndex collectionName="createIndexNoOptionsTest">
        <ext:keys>
            { clientId: 1, type: 1}
        </ext:keys>
    </ext:createIndex>
</changeSet>
Command failed with error 9 (FailedToParse): 'The 'name' field is a required property of an index specification' on server localhost:27017. The full response is {"ok": 0.0, "errmsg": "The 'name' field is a required property of an index specification", "code": 9, "codeName": "FailedToParse"}

obraz

Also, when #283 is solved I believe test case with preconditions should be also covered:

<changeSet id="1" author="alex">
    <preConditions onFail="MARK_RAN">
        <not>
            <indexExists indexName="ui_tppClientId"/>
        </not>
    </preConditions>
    <ext:createIndex collectionName="createIndexTest">
        <ext:keys>
            { clientId: 1, type: 1}
        </ext:keys>
        <ext:options>
            {unique: true, name: "ui_tppClientId"}
        </ext:options>
    </ext:createIndex>

    <ext:createIndex collectionName="createIndexNoOptionsTest">
        <ext:keys>
            { clientId: 1, type: 1}
        </ext:keys>
    </ext:createIndex>
</changeSet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant