Skip to content
home@dennisPersonal Website of Dennis Plöger
  • Home
  • Blog
  • Artist
  • Impressum
  • Datenschutzerklärung

Introducing Handler Inspector

22. Dezember 2023 0 comments Article Allgemein

While working on the test suite for the vmware-rest-proxy I needed a mock server to mock away the vSphere API calls the proxy uses. Suprisingly, gotest already includes just that. While this is a nice thing compared to other languages, which need big and complicated packages to achieve the same result, configuring the required handler was a bit of a hassle and especially testing the calls to it with local counters and variables just didn’t feel right.

As I’m in love with the Builder pattern, especially for writing tests, I created golang-handlerinspector. This module includes a tool to create http.Handler values using the builder pattern. Additionally, the handler records the calls to it and can be analyzed using an included „inspector“.

It’s currently tailored to DoDevOps‘ needs for the vmware-rest-proxy, but can easily be extended to support more things. (Which translates to: I’m open to receive Pull Requests for it 🙂)

(Photo by Emiliano Vittoriosi auf Unsplash)

Schreibe einen Kommentar Antwort abbrechen

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Diese Website verwendet Akismet, um Spam zu reduzieren. Erfahre, wie deine Kommentardaten verarbeitet werden.

Neueste Beiträge

  • Making Puppet host reports in Foreman available in Grafana
  • Introducing Handler Inspector
  • Github Action for the Godot Asset library
  • Announcing EgoVenture
  • The third installment of my learning project

Schlagwörter

administration apache blog configuration configuration management development dhcp disclaimer django documentation dokuwiki extension footer hammerspoon java javascript jslint keyboard lbows linux log migration milter news php plugin printer python rest rhino server shortcut skd soap social ssh survey twitter ubuntu vmware website window management zimbra zimlet zimlets

Meta

  • Anmelden
  • Eintrags-Feed
  • Kommentar-Feed
  • WordPress.org

Neueste Beiträge

  • Making Puppet host reports in Foreman available in Grafana
  • Introducing Handler Inspector
  • Github Action for the Godot Asset library
  • Announcing EgoVenture
  • The third installment of my learning project

Schlagwörter

administration apache blog configuration configuration management development dhcp disclaimer django documentation dokuwiki extension footer hammerspoon java javascript jslint keyboard lbows linux log migration milter news php plugin printer python rest rhino server shortcut skd soap social ssh survey twitter ubuntu vmware website window management zimbra zimlet zimlets

Meta

  • Anmelden
  • Eintrags-Feed
  • Kommentar-Feed
  • WordPress.org

Copyright (c) Dennis Plöger | Theme by ThemeinProgress | Proudly powered by WordPress

Zum Ändern Ihrer Datenschutzeinstellung, z.B. Erteilung oder Widerruf von Einwilligungen, klicken Sie hier: Einstellungen