hunk.code_window: 	// "text" will result in a string setting that can be typed in manually.
   	//
   	// "longtext" will result in a multi line string that can be typed in manually.
   	//
   	// "username" will result in a text setting that will autocomplete to a username.
   	//
   	// "custom" will result in a custom defined setting and will load the custom component registered for the Web App System Console.
   	Type string `json:"type" yaml:"type"`
  
hunk.labels: keep keep keep add keep keep keep keep keep
hunk.after_edit: 	// "number" will result in in integer setting that can be typed in manually.
   	//
  
hunk.file_path: model/manifest.go
hunk.type: add
file: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
  // See LICENSE.txt for license information.
  
  package app
  
  import (
  	"net/http"
  	"testing"
  
  	"github.com/stretchr/testify/require"
  )
  
  func TestCheckForClientSideCert(t *testing.T) {
  	th := Setup(t)
  	defer th.TearDown()
  
  	var tests = []struct {
  		pem           string
  		subject       string
  		expectedEmail string
  	}{
  		{"blah", "blah", ""},
  		{"blah", "C=US, ST=Maryland, L=Pasadena, O=Brent Baccala, OU=FreeSoft, CN=www.freesoft.org/emailAddress=test@test.com", "test@test.com"},
  		{"blah", "C=US, ST=Maryland, L=Pasadena, O=Brent Baccala, OU=FreeSoft, CN=www.freesoft.org/EmailAddress=test@test.com", ""},
  		{"blah", "CN=www.freesoft.org/EmailAddress=test@test.com, C=US, ST=Maryland, L=Pasadena, O=Brent Baccala, OU=FreeSoft", ""},
  	}
  
  	for _, tt := range tests {
  		r := &http.Request{Header: http.Header{}}
  		r.Header.Add("X-SSL-Client-Cert", tt.pem)
  		r.Header.Add("X-SSL-Client-Cert-Subject-DN", tt.subject)
  
  		_, _, actualEmail := th.App.CheckForClientSideCert(r)
  
  		require.Equal(t, actualEmail, tt.expectedEmail, "CheckForClientSideCert(%v): expected %v, actual %v", tt.subject, tt.expectedEmail, actualEmail)
  	}
  }
  