Cerulean
Cerulean is a golang library for mocking Azure
Install / Use
/learn @goshlanguage/CeruleanREADME
Cerulean
This project is currently unmaintained.
Cerulean is a mock Azure API, designed for writing infrastructure tests so you can run tests without spending that dosh. This is great for folks who are using the azure-sdk-for-go especially. Here's a nifty example:
package test
import (
"fmt"
"testing"
"github.com/azure/azure-sdk-for-go/services/resources/mgmt/2019-11-01/subscriptions"
"github.com/goshlanguage/cerulean"
)
func TestSubscription(t *testing.T) {
server := cerulean.New("c27e7a81-b684-4fce-91d8-fed9e9bb534a")
client := subscriptions.NewClientWithBaseURI(server.GetBaseClientURI())
client.Authorizer = autorest.NullAuthorizer{}
resultPage, err := client.List(context.TODO())
if err != nil {
panic(err)
}
// do stuff with your mocked client
}
This project is artisanally crafted, laptop to market software. Please open an issue if you find a bug or have a request. PRs are welcome.
Design
Cerulean works by creating an http server that mimics the Azure API rest endpoints and responses. You can then redirect your Azure SDK clients to use the address of this mock server, and your client will then talk to this mock. This project is inspired by moto.
Cerulean emulates the Azure API. There are two good references for the API to use in development:
If you decide to explore the API via curl or postman with the docs above, this article may be helpful to you: https://medium.com/@mauridb/calling-azure-rest-api-via-curl-eb10a06127
If you prefer swagger, then you can load in the specs you want to reference by passing it's URL, such as:
Related Skills
node-connect
352.2kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
111.1kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
352.2kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
352.2kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
