Skip to content

Commit c397cab

Browse files
authored
fix test gate (kubernetes#2100)
* fix testgate * update golint, remove deprecated BuildNameToCertificate method * remove cryptography override * update secretstorage
1 parent 88ddaa2 commit c397cab

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ build-cmd-%: work $(SOURCES)
155155
test: unit functional
156156

157157
check: work
158-
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.46.1 run ./...
158+
go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.51.1 run ./...
159159

160160
unit: work
161161
go test -tags=unit $(shell go list ./... | sed -e '/sanity/ { N; d; }' | sed -e '/tests/ {N; d;}') $(TESTARGS)

cmd/openstack-cloud-controller-manager/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import (
4444
)
4545

4646
func main() {
47-
rand.Seed(time.Now().UnixNano())
47+
rand.NewSource(time.Now().UnixNano())
4848

4949
ccmOptions, err := options.NewCloudControllerManagerOptions()
5050
if err != nil {

pkg/identity/keystone/token_getter.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package keystone
1919
import (
2020
"crypto/tls"
2121
"fmt"
22+
"net/http"
2223
"os"
2324

2425
"github.com/gophercloud/gophercloud"
@@ -29,7 +30,6 @@ import (
2930
osClient "k8s.io/cloud-provider-openstack/pkg/client"
3031
"k8s.io/cloud-provider-openstack/pkg/version"
3132
"k8s.io/klog/v2"
32-
"net/http"
3333
)
3434

3535
type Options struct {
@@ -76,7 +76,6 @@ func GetToken(options Options) (*tokens3.Token, error) {
7676
return token, msg
7777
}
7878
tlsConfig.Certificates = []tls.Certificate{cert}
79-
tlsConfig.BuildNameToCertificate()
8079
setTransport = true
8180
}
8281

tests/playbooks/roles/install-devstack/tasks/main.yml

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,12 @@
101101
rm -rf /usr/lib/python3/dist-packages/PyYAML-*.egg-info
102102
# https://bugs.launchpad.net/devstack/+bug/1906322
103103
sed -i 's|$cmd_pip $upgrade |$cmd_pip $upgrade --ignore-installed |g' {{ workdir }}/inc/python
104-
python3 -m pip install --upgrade pip==20.2.3
104+
python3 -m pip install --upgrade pip==23.0
105+
python3 -m pip install --upgrade keystoneauth1==5.1.1
106+
python3 -m pip install --upgrade setuptools
107+
python3 -m pip install --upgrade python-debian
108+
python3 -m pip install --upgrade distro-info
109+
python3 -m pip install --upgrade SecretStorage
105110
106111
- name: Change devstack directory owner
107112
file:
@@ -121,10 +126,3 @@
121126
cmd: |
122127
set -ex
123128
sudo -u {{ user }} -H ./stack.sh
124-
125-
- name: Remove openstack CLI warnings
126-
shell:
127-
executable: /bin/bash
128-
cmd: |
129-
# To avoid the warning msg: "CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead"
130-
python3 -m pip install cryptography==3.3.2

0 commit comments

Comments
 (0)