Skip to content

Commit

Permalink
fix: docker tests for cmd-registry-memory is outdated (#172)
Browse files Browse the repository at this point in the history
* Sync files with networkservicemesh/cmd-template

This PR syncs files with https://github.com/networkservicemesh/cmd-template

Revision: https://github.com/networkservicemesh/cmd-template/commits/3e2ed1603ab8c6b1b1a5107e9f1eba29a2f5810a

commit 3e2ed1603ab8c6b1b1a5107e9f1eba29a2f5810a
Author: Denis Tingaikin <49399980+denis-tingaikin@users.noreply.github.com>
Date:   Mon Jan 11 21:44:08 2021 +0700

    fix: update-deployments-k8s job should wait for dockerPush (#59)

    * fix update-deployments-k8s job

    Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>

    * fix yml linter

    Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>

Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>

* fix failing tests

Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>

* fix linter issues

Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>

Co-authored-by: NSMBot <nsmbot@networkservicmesh.io>
  • Loading branch information
denis-tingaikin and NSMBot authored Jan 12, 2021
1 parent cb8a5f7 commit 73ab362
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ jobs:
update-deployments-k8s:
name: Update deployments-k8s
runs-on: ubuntu-latest
needs:
- pushImage
if: github.repository != 'networkservicemesh/cmd-template' && github.actor == 'nsmbot' && github.base_ref == 'master' && github.event_name == 'pull_request'
steps:
- name: Checkout ${{ github.repository }}
Expand Down
8 changes: 5 additions & 3 deletions main_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2020 Doc.ai and/or its affiliates.
// Copyright (c) 2020-2021 Doc.ai and/or its affiliates.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -203,7 +203,9 @@ func (t *RegistryTestSuite) TestNetworkServiceEndpointRegistration() {

t.Nil(err)
t.NotEmpty(result.Name)
stream, err := client.Find(context.Background(), &registry.NetworkServiceEndpointQuery{NetworkServiceEndpoint: result})
stream, err := client.Find(context.Background(), &registry.NetworkServiceEndpointQuery{NetworkServiceEndpoint: &registry.NetworkServiceEndpoint{
Name: result.Name,
}})
t.Nil(err)
list := registry.ReadNetworkServiceEndpointList(stream)
t.Len(list, 1)
Expand Down Expand Up @@ -245,7 +247,7 @@ func (t *RegistryTestSuite) TestNetworkServiceEndpointRegistrationExpiration() {
t.Nil(err)
list = registry.ReadNetworkServiceEndpointList(stream)
return len(list) == 0
}, time.Second*5, time.Millisecond*100)
}, time.Until(result.GetExpirationTime().AsTime())+time.Second*5, time.Millisecond*100)
}

func (t *RegistryTestSuite) TestNetworkServiceEndpointClientRefreshingTime() {
Expand Down

0 comments on commit 73ab362

Please sign in to comment.