Immutable File Unix reminder

lsattr /etc/pgbouncer/users.txt
 ----i--------e- /etc/pgbouncer/users.txt

lsattr /etc/pgbouncer/users.txt
----i--------e- /etc/pgbouncer/users.txt
 
sudo chattr -i /etc/pgbouncer/users.txt
lsattr /etc/pgbouncer/users.txt
 -------------e- /etc/pgbouncer/users.txt
 
vim /etc/pgbouncer/users.txt
sudo chattr +i /etc/pgbouncer/users.txt
lsattr /etc/pgbouncer/users.txt
----i--------e- /etc/pgbouncer/users.txt

Continuous Integration

Developers practicing continuous integration merge their changes back to the main branch as often as possible. The developer’s changes are validated by creating a build and running automated tests against the build. By doing so, you avoid the integration hell that usually happens when people wait for release day to merge their changes into the release branch.

Continuous integration puts a great emphasis on testing automation to check that the application is not broken whenever new commits are integrated into the main branch.

Benefits of pull requests

  • Use this collaborative platform to discuss potential modifications to the code.
  • Improve code quality.
  • Simplify the process of receiving feedback from the reviewer.
  • Address feedback easily in-line near the relevant code.
  • Provide better stability for the code.

Install Laravel Nova

1 - composer create-project --prefer-dist laravel/laravel admin "5.8.*"
2 - add/update in composer.json the following item
"repositories": [
    {
        "type": "composer",
        "url": "https://nova.laravel.com"
    }
],
Next, you may add laravel/nova to your list of required packages in your composer.json file:

"require": {
    "php": "^7.1.3",
    "fideloper/proxy": "^4.0",
    "laravel/framework": "5.8.*",
    "laravel/nova": "~2.0"
},
3 - php artisan nova:install

4 - php artisan migrate

phpUnit Debug Technics Guzzle

$body = json_decode($response->getBody());

 fwrite(STDERR, json_encode($json));
 fwrite(STDERR, $body->message);
 public function testSuccesssfulJobCancel()
{

    $this->postOrderSuccesful();

    $headers = [
        'Authorization' => QATemplate::$deleteKey,
    ];
    $url = '/v1/jobId/M111111123-001';

    $response = QATemplate::$http->request(
        'DELETE',
        $url,
        [
            'verify' =>false,
            'http_errors' => false,
            'headers' =>$headers
        ]
    );

    $body = json_decode($response->getBody());

    fwrite(STDERR, json_encode($json));
    fwrite(STDERR, $body->message);


    $this->assertEquals(200, $response->getStatusCode());
    $this->assertContains("Success Job Deleted", $body->message);
}