This rule needs to be adapted to your setup and needs to be tested before it's activated. Activating lifecycle rules can instantly delete images from registries.

"tagStatus": "tagged", "countType": "sinceImagePushed", "countUnit": "days", "countNumber": 10 }, "action": { "type": "expire" } } ] } Careful when testing Testing these rules is a little confusing because of the wording in the AWS console...

...default for building is production. Activate an environment with -e staging or --environment=staging. Test for environments like this: environment? :staging Testing Complex "static" pages might need some integration testing...

...To employ Cucumber with Spreewald and Selenium, add these gems to the Gemfile: group :test do gem 'cucumber' gem 'spreewald' gem 'capybara' gem 'selenium-webdriver' # Only for running tests in...

github.com

...What you can do is change the time zone of the process running your tests by setting a TZ=CET (or TZ=PDT or TZ=UTC etc.) environment variable.

...way, when the test process spawns another process to run a browser, it will inherit the environment and also believe it lives in that zone. To do so, run the...

baz: "example" We can now load it as usual, but pass freeze: true. >> test = YAML.safe_load_file('example.yml', freeze: true) => {"message"=>["hello", "universe"], "foo"=>{"bar"=>{"baz"=>"example"}}}

...itself is frozen: >> test.frozen? => true And no matter how deep you dig, everything inside that Hash is also frozen. >> test['message'].frozen? => true >> test['foo']['bar']['baz'].frozen? => true

...yourself in Cucumber scenarios. Cucumber Factory We have a very useful gem to create test data in cucumber: cucumber_factory. Read through the README. Integrate it into your MovieDB and...

...you cannot find any opportunities to DRY up a Cucumber scenario, do this exercise (testing the file upload from before): Write a scenario: User can upload a movie poster in...

getbootstrap.com

Suggestion: Upgrade to a newer version before doing the Bootstrap upgrade and test if everything still works as expected. Here is a migration guide for Select2

...navigation on your own. Tip: Add a feature for your navigation bar beforehand and test links and their highlighting (don't forget dropdown submenus!). After upgrading to Bootstrap 4 you...

makandra dev

...Binding URL with the LogoutResponse. Keycloak does this when Front channel logout is disabled. Testing in development using a local keycloak server You can test this using a local keycloak...

...and is enabled per default This just worked for me, so no troubleshooting here Testing in development using a local keycloak server You can test this using a local keycloak...

...TLSv1.3 gelöst? Du weißt, wie du eine Webseite auf die Sicherheit der SSL Konfiguration testen kannst. Du kennst Certificate Transparency logs und weißt wofür das gut ist.

...Was kannst du hier herausfinden? Wie ist es möglich, dass die Informationen dort vorliegen? Teste makandra.de auf SSL Labs. Schau dir das Testergebnis an und verstehe welche Ergebnisse dir angezeigt...

config.move_to_store = true We have a separate card about that. Store test files separately. Also add support for parallel tests. You can easily do that by setting...

config.root = "#{Rails.public_path}/system/#{Rails.env}#{ENV['TEST_ENV_NUMBER']}".freeze For debugging purposes (e.g. trying to hunt down a staging bug locally), it might make sense to allow reading...

...main').search('horizon').where('year > 1995').order(:year).to_a Adapt both the integration test and RSpec examples for the search functionality, using the guidelines from the "Testing" chapter in...

...Growing Rails Applications in Practice. RSpec examples should cover all edge cases E2E tests should only cover one "happy path" to show successful integration Open budgets in Project Hero (makandra...

...verification") added without_partial_double_verification. This might be handy in case you are testing helpers in Rails, where you sometimes rely on methods defined in the application controller (e.g...

...module UsersHelper def user_display_name [current_user.first_name, current_user.last_name].join(' ') end end Unit test with error describe UsersHelper do describe '#user_display_name' do it 'returns the first and...

github.com

...you are using database-cleaner with DatabaseCleaner.strategy = :transaction, this could lead to problems in tests. You should use DatabaseCleaner.strategy = :truncation for the tests that touch your parallelized code...

...than Dir.tmpdir e.g. Dir.mktmpdir('foo', Rails.root.join('tmp')) => /home/user/rails_example/tmp/foo20220912-14561-pyr8qd. This might be necessary when your tests are running on CI. For this you might also want to commit tmp/.gitkeep to git...

...tmp dir inside your project is present. Example Dir.mktmpdir('exports') => "/tmp/exports20220912-14561-pobh0a" Improving your parallel tests with Dir.mktmpdir When creating directories in parallel tests manually, you normally need to handle these...

...close them as well! See the suggested helper at the bottom of this card. Test support If you access Redis in tests, I suggest introducing a helper method. Example for...

...redis ||= Redis.new(url: REDIS_URL) end end RSpec.configure do |config| config.include(RedisHelpers) end Your Tests may then say redis.get('example'). But I still want to use a global

makandra dev

...do not need a code review, but use the merge request to run a test pipeline: # Push branch, create a merge request, set the branch to be removed on merge...

...and set to merge when all tests are green ptm = push -u origin HEAD -o merge_request.create -o merge_request.merge_when_pipeline_succeeds -o merge_request.remove_source_branch Miscellaneous [core] editor = vim # Set...

makandra Curriculum

...should be ignored and no validation errors should be shown. Make sure to write tests for the showtimes form. How do you refer to the showtimes fields when there are...

...must not contain any code or names specific to movies or the movie form. Test that the component is reusable by allowing to add an actor's roles from within...

makandra dev

helps you debugging errors like DNS lookup limit reached it also lets you test a new SPF strings before applying it. This can save you time as you don...

...with operations Also the advanced check at vamsoft.com has a very good interface to test new SPF policies...

thegnar.com

View specs are a powerful tool to test several rendering paths by their cases instead of using a more costing feature spec. This is especially useful because they become quite...

...the view independent from the controller-logic. Therefore it will be more applicable to test views within request specs. But, even then, you still can use Caypbara's matchers within...

...processing library. See here for a list of supported queueing adapters. For development and test it also brings its own queue adapters (async, inline and test). Note: For production use...

...have different adapters for different environments): config.active_job.queue_adapter = :sidekiq To set specific adapters in tests, you can create a spec/support/active_job.rb with: RSpec.configure do |config| config.before(:suite) do ActiveJob::Base.queue_adapter...

...navigate to Settings -> Editor -> File and Code Templates. Example You can navigate to the test file of the currently open file with the shortcut Ctrl + T. If no test file...

...exists, you can generate a new test file. If you are not pleased with the output, you can adjust the related code template. To do this, open the project settings...

to add the Ruby, Rails and RSpec cops to include the unit test 2. Report all existing offenses and exclude them initially To start your Rubocop integration it...

...rubocop --auto-gen-config to create a file that excludes all current violations. Your tests (including the Rubocop spec) should now all be green. Commit theses changes and consider whether...

makandra Curriculum

...should have an overview which kinds of validations are built into Rails. Also read Testing ActiveRecord validations with RSpec. Make the following changes to your MovieDB: Make sure your MovieDB...

...for black and white movies and release_year >= 1917 for color movies. Add tests for your validation. Make sure you have a test for each case...

...on VCR and WebMock to prevent any real network connection when running our unit tests. This is not entirely true: They are both limited to a set of HTTP libraries...

...OpenURI#open_uri are not mocked and will trigger real network requests even in tests. This might bite you e.g. in older versions of CarrierWave with remote file URLs.

...directly on GitLab, or by checking out the corresponding branch. You can assume that tests are green, but you need to confirm that everything requested in the issue is implemented...

...test coverage is good the code is maintainable What to do if the code is okay If the code is okay, you may either merge it into main yourself: