September 19, 2018

Automated vs Manual

We always speak about automating everything, especially in the tech world where everything goes so fast. And I agree that if you can, you should automate processes as much as you can. But there is value in doing things manually sometimes. The first value is for learning. If you are learning a new technology you will have to put the work, and manually tweak code, settings until you really understand how it works. Read more

September 13, 2018

New VA From an Existing One With Packer

When deploying Virtual Appliances (VA), you want the process to be automated and repeatable, not just a one shot configured and exported manually. Thanks to Packer, automating this is just a question of creating a JSON configuration file and letting it do its magic. Packer is used by giving it an ISO image of a base distribution, installing the distribution and running the modifications you want. This is good when creating new VAs, but what can you do if you already have an existing one? Read more

September 12, 2018

Testing Rest API Responses

I have been developping a REST API at work using Flask, and wanted to test the response I got. I started by testing directly the raw response using response.data, which works for small responses. As soon as you want to make it dynamic, it becomes a nightmare. Let’s say we start with the following test # Bad idea def test_response_string(): response = client.get("/test") assert response.status_code == 200 assert response.data == '{"key1": "value1", "key2": "value2"}' Now, with just this test, adding a value or modifying it would be easy. Read more

Copyright Marin Gilles 2019-2022