What is the difference in writing test cases and writing Sanity test cases for sign up of any website? Could anyone please let me understand by giving few test cases or example of Sanity test cases for sign up page of any website?
nishika
@nishika
Best posts made by nishika
-
Sanity test cases example for a website?
Latest posts made by nishika
-
Is there a way to exclusively manage multiple ssh keys with differing per-key options using ansible?
Ansible provides a https://docs.ansible.com/ansible/latest/collections/ansible/posix/authorized_key_module.html module which provides a lot of functionality:
- You can set
exclusive: true
to delete all other keys. - You can set
key_options: ...
. - You can list multiple keys in
key
by separating them with new lines.
Is there a way to combine all of the above?
The naive approach results in the
key_options
to be applied to all keys rather than having key options per key.Is this a case of generating
authorized_keys
usingansible.builtin.file
given the exclusiveness? - You can set
-
Clarity on Azure DevOps parallel job "consumption"
We're in the process of moving away from Visual Studio's web publish into Azure DevOps and require some clarity on how parallel jobs are "consumed", or an alternative way to quickly deploy our application to multiple destinations.
Our web application has a single code-base and is published into 15 separate clients' hosting areas (all on Azure App Services), each with their own configuration file transform during the final deployment process, e.g.:
Currently the process is working well on Azure DevOps' "free" account, but it takes around one hour to deploy to each client hosting environment as the processes run in a queue (
Deploy Customer 1
→Deploy Customer 2
→ ...).Yesterday to streamline the process and get the deployments done asynchronously we purchased three "Parallel Jobs" from the billing area. Deployment was indeed much quicker as three ran in parallel. However, when they were finished there were no parallel jobs available in our account.
The https://learn.microsoft.com/en-us/azure/devops/pipelines/licensing/concurrent-jobs?view=azure-devops&tabs=ms-hosted talks about monthly resources, so we had assumed that the parallel job agents were a one-month purchase (buy once/use many in that month).
If they are consumed immediately upon completion then according to the https://azure.microsoft.com/en-gb/pricing/details/devops/azure-devops-services/ , if have a weekly release and use 15 parallel jobs then that will cost me over £2,000 per month (£35.34 * 15 * 4) which seems unbelievably expensive for a short time saver.
Can anyone please clarify the situation, or suggest an alternative method for deploying asynchronously?
-
RE: How to decrypt Jenkins password?
Jenkins uses string interpolation to take password as input and it uses AES to encrypt and protect secrets, credentials, and their respective encryption keys.
So, using direct or simple approach will not work. Although you can try to assign the password to a string variable and the print it in log it works in most the cases until the password itself is saved after encrypting.
-
Docker Compose: How do you build an image while running another container?
I'm trying to build a Nuxt 3 application using docker compose. However, I'm having trouble with docker compose and dockerfile configuration.
Context
To give background on the project that I'm working on, here are the stack that I'm using:
- Nuxt 3 for SSG
- Strapi for CMS
- Nginx for serving static contents generated from Nuxt 3
So, in Nuxt 3 I can run
npx nuxi generate
to pre-render/generate static contents for the website. After generating the static HTML files, nginx will serve the static contents. Strapi will serve as headless CMS, providing contents for the website.Problem
The problem is that, when pre-rendering a static contents in Nuxt 3, it requires Strapi backend to run so that it can fetch the contents from Strapi CMS and generate the html files.
So in terms of command line, I need to make sure that Strapi server is running (
strapi start
) and only then generate the static files (npx nuxi generate
) or else there would be an error during build process because Nuxt application cannot fetch resource from the strapi server.When using docker, I need to make sure that Strapi server container is running while building the Nuxt/node.js image. However, I don't know how I'm supposed to run a container (strapi server) while building an image (Nuxt SSG contents).
Files
Dockerfile.client
# Nuxt Image FROM node:16-alpine as build WORKDIR /app COPY ./client . RUN npm install RUN npm run generate
Nginx Image
FROM nginx:1.15 as publish
COPY --from=build /app/.output/public/ /usr/share/nginx/html
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 80
ENTRYPOINT ["nginx", "-g", "daemon off;"]
Dockerfile.server
# Strapi Image FROM node:16-alpine # Installing libvips-dev for sharp Compatability RUN apk update && apk add build-base gcc autoconf automake zlib-dev libpng-dev nasm bash vips-dev ARG NODE_ENV=production ENV NODE_ENV=${NODE_ENV} WORKDIR /opt/ COPY ./server/package.json ./server/yarn.lock ./ ENV PATH /opt/node_modules/.bin:$PATH RUN yarn config set network-timeout 600000 -g && yarn install WORKDIR /opt/app COPY ./server . RUN yarn build EXPOSE 1337 CMD ["yarn", "start"]
docker-compose.yml
In
docker-compose.yml
file, I specified three services (client, server, database) and all of them belong to one network. I made sure that clientdepends_on
server and database.
I just started learning docker few days ago and it's my first time doing DevOps so I might be missing the mark... Any help will be appreciated.
Edit 1:
I tried separating
docker-compose.yml
into two:docker-compose.yml
for strapi server and database servicedocker-compose.client.yml
for Nuxt service
I ran
docker compose up
for running Strapi server first. After Strapi container was running, I tried runningdocker compose -f docker-compose.client.yml up --build
to build Nuxt image and hoping it would refer to the running strapi container. Unfortunately, Nuxt image was not referring to the running strapi container. -
RE: Can the status be running after applying the yaml file?
Running means that container(s) in your Pod is/are not crashed. Entrypoint started, and command is still running.
Creating that yaml (assuming we fixed case / caps characters aren't at the right place, ...). Pod will be Running. Why: because process has no reason to crash. Because if I inspect that image it uses, entrypoint/cmd is just some /bin/sh -c /bin/sh. Shell will start and keep running.
-
RE: How to use same terraform code for both kubernetes clusters Oracle (OKE) and AWS (EKS)?
You have commented out the
count
check of theaws_eks_cluster.eks
data source that would make the data source conditional, depending on thek8s_cluster_type
setting. Uncommenting the count argument should make it skip the data source and not complain about it not being found.data "aws_eks_cluster" "eks" { count = var.k8s_cluster_type == "oke" ? 0 : 1 name = var.eks_cluster_name }
-
RE: How do I supply a professional license to a Docker image?
As per an https://m-square.com.au/docker-for-windows-server-and-image2docker/ about Windows containers, it mentions the following:
For production, licensing is at the host level, i.e. each machine or VM which is running Docker. Your Windows license on the host allows you to run any number of Windows Docker containers on that host. With Windows Server 2016 you get the commercially supported version of Docker included in the license costs, with support from Microsoft and Docker, Inc.
This is supported by the fact that https://www.docker.com/partners/microsoft/ , which is in turn supported by Microsoft team member https://social.technet.microsoft.com/profile/myles%20keating/?ws=usercard-mini in a https://social.technet.microsoft.com/Forums/en-US/1883e69a-1a58-44e9-a2f8-de89b01f8300/understanding-of-license-for-using-docker-on-windows-server-2016 on a similar topic who appears to have https://www.slate.com/blogs/business_insider/2015/04/02/stanford_graduates_get_fought_over_by_tech_companies_like_snapchat_and_have.html . The archived post is also mentioned in a https://forums.docker.com/t/microsoft-windowsservercore-license/25983 .
As a more general tip, to decide if https://hub.docker.com/_/microsoft-windows-servercore is really the image you'd like to use, check out the other available https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-base-images .
-
RE: bind mount from host not appearing in docker container when using compose
My guess is different defaults to https://docs.docker.com/storage/bind-mounts/#configure-bind-propagation between
docker run
anddocker compose
. Try setting it to rslave or shared in your compose file:version: "3.3" services: env: image: debian:latest volumes: - "/home/quant:/root/host:rslave"
-
Where does k3s store it's "/var/lib/kubelet/config.yaml" file?
Referencing another https://stackoverflow.com/a/54443743/124486 , they suggest setting
evictionHard: imagefs.available: 1% memory.available: 100Mi nodefs.available: 1% nodefs.inodesFree: 1%
In the file
/var/lib/kubelet/config.yaml
. However, I do not see that file in my k3s distribution of kubernetes. Where is this file located with k3s? -
RE: How to do maintenance work in kubernetes cluster
We were https://github.com/freelawproject/courtlistener/issues/2079#issuecomment-1145998549 by following the rules for when a node is terminated. According to the https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-types-of-pods-can-prevent-ca-from-removing-a-node , there are a number of ways that pods can prevent the cluster autoscaler from removing a node. One type of pod is:
Pods that are not backed by a controller object (so not created by deployment, replica set, job, stateful set etc).
So our solution is to create a pod in that way via a manifest file. This lets us have a pod named
maintenance
that sticks around and isn't killed by the cluster autoscaler:--- apiVersion: v1 kind: Pod metadata: name: maintenance namespace: blah labels: type: maintenance spec: containers: - name: web image: whatever imagePullPolicy: IfNotPresent command: [bash] stdin: true tty: true