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

Then its key condition be value doesn't work correctly #225

Closed
melcloud opened this issue Mar 3, 2020 · 5 comments
Closed

Then its key condition be value doesn't work correctly #225

melcloud opened this issue Mar 3, 2020 · 5 comments
Assignees
Labels
bug waiting for confirmation Workaround/Fix applied, waiting for confirmation

Comments

@melcloud
Copy link

melcloud commented Mar 3, 2020

Description :
When using "Then its key condition be value", it doesn't perform exact match

To Reproduce

  1. terraform plan file:
{
    "address": "module.appmesh_existing.aws_appmesh_virtual_node.vn[\"ui\"]",
    "module_address": "module.appmesh_existing",
    "mode": "managed",
    "type": "aws_appmesh_virtual_node",
    "name": "vn",
    "index": "ui",
    "provider_name": "aws",
    "change": {
        "actions": [
            "create"
        ],
        "before": null,
        "after": {
            "mesh_name": "demo2",
            "name": "ui-vn",
            "spec": [
                {
                    "backend": [],
                    "listener": [
                        {
                            "health_check": [],
                            "port_mapping": [
                                {
                                    "port": 80,
                                    "protocol": "http"
                                }
                            ]
                        }
                    ],
                    "logging": [
                        {
                            "access_log": [
                                {
                                    "file": [
                                        {
                                            "path": "/dev/stdout"
                                        }
                                    ]
                                }
                            ]
                        }
                    ],
                    "service_discovery": []
                }
            ],
            "tags": {
                "Name": "ui-vn"
            }
        },
        "after_unknown": {
            "arn": true,
            "created_date": true,
            "id": true,
            "last_updated_date": true,
            "spec": [
                {
                    "backend": [],
                    "backends": true,
                    "listener": [
                        {
                            "health_check": [],
                            "port_mapping": [
                                {}
                            ]
                        }
                    ],
                    "logging": [
                        {
                            "access_log": [
                                {
                                    "file": [
                                        {}
                                    ]
                                }
                            ]
                        }
                    ],
                    "service_discovery": []
                }
            ],
            "tags": {}
        }
    }
}
  1. -f "test/" -p "examples/complete/tfplan"
  2. run in docker
  3. No error output, but should have
  4. <Your feature/scenario/steps>
  Scenario: Appmesh module can use existing appmesh
    Given I have aws_appmesh_virtual_node defined
    When its address is module.appmesh_existing.aws_appmesh_virtual_node.vn
    And its index is ui
    Then its mesh_name must be demo

Expected behavior :
Expect the above scenario to fail as mesh_name should be demo2

Tested versions :

  • 1.1.10, 1.1.9
  • 0.12.21

Additional context
Looks like the "Then its key condition be value" is partial match on value (like starts with). Because if I change the above to "Then its mesh_name must be demofoo", it fails as expected.

The old filter syntax works as expected. Following scenario failed as expected when using filter:

  Scenario: Appmesh module can use existing appmesh
    Given I have aws_appmesh_virtual_node defined
    When its address is module.appmesh_existing.aws_appmesh_virtual_node.vn
    And its index is ui
    Then it must contain mesh_name
    And its value must be demo
@eerkunt
Copy link
Member

eerkunt commented Mar 4, 2020

Thanks for the issue @melcloud 🎉

I thought, I fixed this issue yesterday with 1.1.10!

Having a look quickly.

eerkunt added a commit that referenced this issue Mar 4, 2020
@eerkunt
Copy link
Member

eerkunt commented Mar 4, 2020

Fixed the problem, waiting for all functional tests to pass, then will release it asap.

@eerkunt
Copy link
Member

eerkunt commented Mar 4, 2020

Just released 1.1.11. Could you please have a try and let me know ?

Thanks!

@melcloud
Copy link
Author

melcloud commented Mar 4, 2020

I can confirm this had been fixed. Thanks for the quick response!

@melcloud melcloud closed this as completed Mar 4, 2020
@ghost
Copy link

ghost commented Mar 4, 2020

This issue's conversation is now locked. If you want to continue this discussion please open a new issue.

@ghost ghost locked and limited conversation to collaborators Mar 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug waiting for confirmation Workaround/Fix applied, waiting for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants