404 Not Found


nginx
beegazpacho.com - GrazzMean
Uname: Linux in-mum-web1557.main-hosting.eu 5.14.0-503.35.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Apr 4 05:23:43 EDT 2025 x86_64
Software: LiteSpeed
PHP version: 8.2.30 [ PHP INFO ] PHP os: Linux
Server Ip: 147.79.69.212
Your Ip: 216.73.216.168
User: u848900432 (848900432) | Group: o51372345 (1051372345)
Safe Mode: OFF
Disable Function:
NONE

name : endpoints_test.go
//go:build go1.9
// +build go1.9

package endpoints

import "testing"

// ***************************************************************************
// All endpoint metadata is sourced from the testdata/endpoints.json file at
// test startup. Not the live endpoints model file. Update the testdata file
// for the tests to use the latest live model.
// ***************************************************************************

func TestEnumDefaultPartitions(t *testing.T) {
	resolver := DefaultResolver()
	enum, ok := resolver.(EnumPartitions)

	if ok != true {
		t.Fatalf("resolver must satisfy EnumPartition interface")
	}

	ps := enum.Partitions()

	if a, e := len(ps), len(defaultPartitions); a != e {
		t.Errorf("expected %d partitions, got %d", e, a)
	}
}

func TestEnumDefaultRegions(t *testing.T) {
	expectPart := defaultPartitions[0]
	partEnum := defaultPartitions[0].Partition()

	regEnum := partEnum.Regions()

	if a, e := len(regEnum), len(expectPart.Regions); a != e {
		t.Errorf("expected %d regions, got %d", e, a)
	}
}

func TestEnumPartitionServices(t *testing.T) {
	expectPart := testPartitions[0]
	partEnum := testPartitions[0].Partition()

	if a, e := partEnum.ID(), "part-id"; a != e {
		t.Errorf("expect %q partition ID, got %q", e, a)
	}

	svcEnum := partEnum.Services()

	// Expect the number of services in the partition + ec2metadata
	if a, e := len(svcEnum), len(expectPart.Services)+1; a != e {
		t.Errorf("expected %d regions, got %d", e, a)
	}
}

func TestEnumRegionServices(t *testing.T) {
	p := testPartitions[0].Partition()

	rs := p.Regions()

	if a, e := len(rs), 2; a != e {
		t.Errorf("expect %d regions got %d", e, a)
	}

	if _, ok := rs["us-east-1"]; !ok {
		t.Errorf("expect us-east-1 region to be found, was not")
	}
	if _, ok := rs["us-west-2"]; !ok {
		t.Errorf("expect us-west-2 region to be found, was not")
	}

	r := rs["us-east-1"]

	if a, e := r.ID(), "us-east-1"; a != e {
		t.Errorf("expect %q region ID, got %q", e, a)
	}

	if a, e := r.Description(), "region description"; a != e {
		t.Errorf("expect %q region Description, got %q", e, a)
	}

	ss := r.Services()
	if a, e := len(ss), 1; a != e {
		t.Errorf("expect %d services for us-east-1, got %d", e, a)
	}

	if _, ok := ss["service1"]; !ok {
		t.Errorf("expect service1 service to be found, was not")
	}

	resolved, err := r.ResolveEndpoint("service1")
	if err != nil {
		t.Fatalf("expect no error, got %v", err)
	}

	if a, e := resolved.URL, "https://service1.us-east-1.amazonaws.com"; a != e {
		t.Errorf("expect %q resolved URL, got %q", e, a)
	}
}

func TestEnumServiceRegions(t *testing.T) {
	p := testPartitions[0].Partition()

	rs := p.Services()["service1"].Regions()
	if e, a := 2, len(rs); e != a {
		t.Errorf("expect %d regions, got %d", e, a)
	}

	if _, ok := rs["us-east-1"]; !ok {
		t.Errorf("expect region to be found")
	}
	if _, ok := rs["us-west-2"]; !ok {
		t.Errorf("expect region to be found")
	}
}

func TestEnumServicesEndpoints(t *testing.T) {
	p := testPartitions[0].Partition()

	ss := p.Services()

	// Expect the number of services in the partition + ec2metadata
	if a, e := len(ss), 6; a != e {
		t.Errorf("expect %d regions got %d", e, a)
	}

	if _, ok := ss["service1"]; !ok {
		t.Errorf("expect service1 region to be found, was not")
	}
	if _, ok := ss["service2"]; !ok {
		t.Errorf("expect service2 region to be found, was not")
	}

	s := ss["service1"]
	if a, e := s.ID(), "service1"; a != e {
		t.Errorf("expect %q service ID, got %q", e, a)
	}

	resolved, err := s.ResolveEndpoint("us-west-2")
	if err != nil {
		t.Fatalf("expect no error, got %v", err)
	}

	if a, e := resolved.URL, "https://service1.us-west-2.amazonaws.com"; a != e {
		t.Errorf("expect %q resolved URL, got %q", e, a)
	}
}

func TestEnumEndpoints(t *testing.T) {
	p := testPartitions[0].Partition()
	s := p.Services()["service1"]

	es := s.Endpoints()
	if a, e := len(es), 2; a != e {
		t.Errorf("expect %d endpoints for service2, got %d", e, a)
	}
	if _, ok := es["us-east-1"]; !ok {
		t.Errorf("expect us-east-1 to be found, was not")
	}

	e := es["us-east-1"]
	if a, e := e.ID(), "us-east-1"; a != e {
		t.Errorf("expect %q endpoint ID, got %q", e, a)
	}
	if a, e := e.ServiceID(), "service1"; a != e {
		t.Errorf("expect %q service ID, got %q", e, a)
	}

	resolved, err := e.ResolveEndpoint()
	if err != nil {
		t.Fatalf("expect no error, got %v", err)
	}

	if a, e := resolved.URL, "https://service1.us-east-1.amazonaws.com"; a != e {
		t.Errorf("expect %q resolved URL, got %q", e, a)
	}
}

func TestResolveEndpointForPartition(t *testing.T) {
	enum := testPartitions.Partitions()[0]

	expected, err := testPartitions.EndpointFor("service1", "us-east-1")
	if err != nil {
		t.Fatalf("unexpected error, %v", err)
	}

	actual, err := enum.EndpointFor("service1", "us-east-1")
	if err != nil {
		t.Fatalf("unexpected error, %v", err)
	}

	if expected != actual {
		t.Errorf("expect resolved endpoint to be %v, but got %v", expected, actual)
	}
}

func TestAddScheme(t *testing.T) {
	cases := []struct {
		In         string
		Expect     string
		DisableSSL bool
	}{
		{
			In:     "https://example.com",
			Expect: "https://example.com",
		},
		{
			In:     "example.com",
			Expect: "https://example.com",
		},
		{
			In:     "http://example.com",
			Expect: "http://example.com",
		},
		{
			In:         "example.com",
			Expect:     "http://example.com",
			DisableSSL: true,
		},
		{
			In:         "https://example.com",
			Expect:     "https://example.com",
			DisableSSL: true,
		},
	}

	for i, c := range cases {
		actual := AddScheme(c.In, c.DisableSSL)
		if actual != c.Expect {
			t.Errorf("%d, expect URL to be %q, got %q", i, c.Expect, actual)
		}
	}
}

func TestResolverFunc(t *testing.T) {
	var resolver Resolver

	resolver = ResolverFunc(func(s, r string, opts ...func(*Options)) (ResolvedEndpoint, error) {
		return ResolvedEndpoint{
			URL:           "https://service.region.dnssuffix.com",
			SigningRegion: "region",
			SigningName:   "service",
		}, nil
	})

	resolved, err := resolver.EndpointFor("service", "region", func(o *Options) {
		o.DisableSSL = true
	})
	if err != nil {
		t.Fatalf("expect no error, got %v", err)
	}

	if a, e := resolved.URL, "https://service.region.dnssuffix.com"; a != e {
		t.Errorf("expect %q endpoint URL, got %q", e, a)
	}

	if a, e := resolved.SigningRegion, "region"; a != e {
		t.Errorf("expect %q region, got %q", e, a)
	}
	if a, e := resolved.SigningName, "service"; a != e {
		t.Errorf("expect %q signing name, got %q", e, a)
	}
}

func TestOptionsSet(t *testing.T) {
	var actual Options
	actual.Set(DisableSSLOption, UseDualStackOption, StrictMatchingOption, UseDualStackEndpointOption)

	expect := Options{
		DisableSSL:           true,
		UseDualStack:         true,
		UseDualStackEndpoint: DualStackEndpointStateEnabled,
		StrictMatching:       true,
	}

	if actual != expect {
		t.Errorf("expect %v options got %v", expect, actual)
	}
}

func TestRegionsForService(t *testing.T) {
	ps := DefaultPartitions()

	var expect map[string]Region
	var serviceID string
	for _, s := range ps[0].Services() {
		expect = s.Regions()
		serviceID = s.ID()
		if len(expect) > 0 {
			break
		}
	}

	actual, ok := RegionsForService(ps, ps[0].ID(), serviceID)
	if !ok {
		t.Fatalf("expect regions to be found, was not")
	}

	if len(actual) == 0 {
		t.Fatalf("expect service %s to have regions", serviceID)
	}
	if e, a := len(expect), len(actual); e != a {
		t.Fatalf("expect %d regions, got %d", e, a)
	}

	for id, r := range actual {
		if e, a := id, r.ID(); e != a {
			t.Errorf("expect %s region id, got %s", e, a)
		}
		if _, ok := expect[id]; !ok {
			t.Errorf("expect %s region to be found", id)
		}
		if a, e := r.Description(), expect[id].desc; a != e {
			t.Errorf("expect %q region Description, got %q", e, a)
		}
	}
}

func TestRegionsForService_NotFound(t *testing.T) {
	ps := testPartitions.Partitions()

	actual, ok := RegionsForService(ps, ps[0].ID(), "service-not-exists")
	if ok {
		t.Fatalf("expect no regions to be found, but were")
	}
	if len(actual) != 0 {
		t.Errorf("expect no regions, got %v", actual)
	}
}

func TestPartitionForRegion(t *testing.T) {
	ps := DefaultPartitions()
	expect := ps[len(ps)%2]

	var regionID string
	for id := range expect.Regions() {
		regionID = id
		break
	}

	actual, ok := PartitionForRegion(ps, regionID)
	if !ok {
		t.Fatalf("expect partition to be found")
	}
	if e, a := expect.DNSSuffix(), actual.DNSSuffix(); e != a {
		t.Errorf("expect %s partition DNSSuffix, got %s", e, a)
	}
	if e, a := expect.ID(), actual.ID(); e != a {
		t.Errorf("expect %s partition ID, got %s", e, a)
	}
}

func TestPartitionForRegion_NotFound(t *testing.T) {
	ps := DefaultPartitions()

	actual, ok := PartitionForRegion(ps, "regionNotExists")
	if ok {
		t.Errorf("expect no partition to be found, got %v", actual)
	}
}

func TestEC2MetadataEndpoint(t *testing.T) {
	cases := []struct {
		Options  Options
		Expected string
	}{
		{
			Expected: ec2MetadataEndpointIPv4,
		},
		{
			Options: Options{
				EC2MetadataEndpointMode: EC2IMDSEndpointModeStateIPv4,
			},
			Expected: ec2MetadataEndpointIPv4,
		},
		{
			Options: Options{
				EC2MetadataEndpointMode: EC2IMDSEndpointModeStateIPv6,
			},
			Expected: ec2MetadataEndpointIPv6,
		},
	}

	for _, p := range DefaultPartitions() {
		var region string
		for r := range p.Regions() {
			region = r
			break
		}

		for _, c := range cases {
			endpoint, err := p.EndpointFor("ec2metadata", region, func(options *Options) {
				*options = c.Options
			})
			if err != nil {
				t.Fatalf("expect no error, got %v", err)
			}
			if e, a := c.Expected, endpoint.URL; e != a {
				t.Errorf("exect %v, got %v", e, a)
			}
		}
	}
}
© 2026 GrazzMean
Beegazpacho


Let’s  Start  Your  Online  Journey  with  Beegazpacho 

Welcome to Beegazpacho,
where creativity meets strategy,
and innovation drives success.


Contact
Now


OUR CLIENTS

WhatsApp-Image-2021-12-06.png
Untitled-design-11.png
niaf-logo.png
20220406-163308-scaled.jpg
karchi-logo.png
20220405-171252.png
20220405-171309.png
20220321-161603.png
20220321-161611.png
20220321-161628.png
20220321-161244.png
20220321-161256.png
20220321-161450.png
20220321-161205.png
20220226-170222.png
20220321-161051.png
20211202-170852.png
Untitled-design-9
pidilite-png-logo-colour
logo-black-e1706125740216-qisosldqhzgcaerhdt6n4t3m4s50jr0iik48z0h5vk
Fraikin-Dayim-logo-1
hpcl-logo-2-1
services

Transforming Ideas into
Success

.01
Digital Marketing

We drive growth through data-driven strategies and cutting-edge techniques.

Learn More

.02
SEO

Improve your online visibility and rank higher on search engines with our expert SEO services.

Learn More

.03
Website Designing

We design websites that are not only visually stunning but also user-centric, ensuring seamless navigation and enhanced user experience.

Learn More

.04
App Development

Our apps are crafted to be intuitive, engaging, and functional, providing your users with an exceptional mobile experience.

Learn More

.05
Social Media Ads

Target the right audience with precision and creativity to maximize engagement and conversions.

Learn More

.06
Google Ads

Maximize ROI with precision-targeted campaigns on Google’s powerful ad platform.

Learn More

.07
Google My Business

Optimize your local presence with strategies that put your business on the map and attract more customers.

Learn More

.08
Graphic Designing

Our designs tell your brand’s story in a visually compelling way.

Learn More

.09
3D Videos

Bring your product to life with immersive and dynamic 3D explainer videos.

Learn More

about BEEGAZPACHO

creating special Things
For special brands

Join the ranks of successful brands by partnering with Beegazpacho

00+

Happy Customer

00+

Continents

Our vision is not just to be a service provider but to be your partner in growth. We see ourselves as an extension of your team, working tirelessly to ensure that your brand not only meets its goals but surpasses them.

Explore
more

Our Recent Work

Crafted with Passion and Precision

Connect now


Web Design
Design, Development & Identity

Logo Design
Design, Development & Identity

Creative Brand design
Design, Development & Identity

Product Design Marketing
Design, Development & Identity

DIGITAL MARKETING
SEO
WEBSITE DESIGNING
APP DEVELOPMENT
SOCIAL MEDIA ADS
GOOGLE ADS
GOOGLE MY BUSINESS
GRAPHIC DESINING
3D VIDEOS
Client Stories

Hear It from Those Who Know Us Best

Our clients’ success stories speak volumes about our commitment to excellence. Don’t just take our word for it—hear directly from the brands we’ve partnered with. Their testimonials highlight our ability to bring visions to life and create a lasting impact on their businesses.

“Beegazpacho feels like an extension of our team. Their content marketing and social media expertise have elevated our brand. They listen, adapt, and always deliver on time. We look forward to continuing this partnership.”

— Sarah Williams

Head of Marketing, GreenPlanet Apparel

“Beegazpacho’s data-driven strategies helped us improve our online ads, optimize our website, and enhance branding. We’ve seen great ROI and increased visibility. Their professionalism is unmatched.”

— Arvind Shah

CEO, InnovateTech Solutions

“Partnering with Beegazpacho has been a game-changer for our brand. Their creative ad campaigns and SEO services have boosted our online presence and significantly increased leads and sales. We couldn’t ask for a better partner!”

— Rina Kapoor

Marketing Director, Luxury Home Interiors

“Beegazpacho feels like an extension of our team. Their content marketing and social media expertise have elevated our brand. They listen, adapt, and always deliver on time. We look forward to continuing this partnership.”

— Sarah Williams

Head of Marketing, GreenPlanet Apparel

“Beegazpacho’s data-driven strategies helped us improve our online ads, optimize our website, and enhance branding. We’ve seen great ROI and increased visibility. Their professionalism is unmatched.”

— Arvind Shah

CEO, InnovateTech Solutions

“Partnering with Beegazpacho has been a game-changer for our brand. Their creative ad campaigns and SEO services have boosted our online presence and significantly increased leads and sales. We couldn’t ask for a better partner!”

— Rina Kapoor

Marketing Director, Luxury Home Interiors