kops/cloudmock/openstack
Jesse Haka 185ccba246 Use random instance names in OpenStack 2021-01-12 14:52:39 +02:00
..
mockblockstorage
mockcompute Use random instance names in OpenStack 2021-01-12 14:52:39 +02:00
mockdns
mockimage Don't use nova for glance mocks 2020-08-21 10:18:52 +02:00
mockloadbalancer
mocknetworking Various mock fixes 2020-10-01 19:15:40 +02:00
BUILD.bazel
README.md
mock.go

README.md

Openstack Cloudmock

Design

Because the gophercloud library does not provide client interfaces whose client-side functions could be mocked like aws-sdk-go, this cloudmock uses a local HTTP server and updates state based on incoming requests from the gophercloud clients. This is how the gophercloud library tests themselves are implemented.

Each package represents one of the Openstack service clients and contains its own net/http/httptest server. Each package defines the endpoints for that client's resources.

Troubleshooting

One recommended way to troubleshoot requests and responses is with Wireshark or an equivalent, monitoring the loopback interface.